Righting Wrap (Part 2)

I first tinkered with SH wrap shading (as described in part 1) for Splinter Cell: Conviction, since we were using a couple of models [1][2] for some character-specific materials. Unfortunately, due to the way that indirect character lighting was performed, it would have required additional memory that we couldn’t really justify at that point in development. Consequently, this work was left on the cutting room floor and I only got as far as testing out Green’s model [1].


This is a companion discussion topic for the original entry at http://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/

Nice article thanks,

Running your sample on my tablet, fwiw, I had the following errors :

(33) : error C7011: implicit cast from "float" to "vec3"
(33) : error C7011: implicit cast from "float" to "vec3"
(33) : error C7011: implicit cast from "float" to "vec3"
(33) : error C1068: too much data in type constructor
(200) : error C7011: implicit cast from "float" to "vec3"
(200) : error C7011: implicit cast from "vec3" to "float"

Could not try to fix them because of the lousy tablet.

Thanks for the report! What tablet/OS/browser is this? I've also been having problems with FF9 that I need to look into.

WebGL is definitely great for demos when it works, but stability and consistency are not quite there yet, nor is the feature set for some of the things I'd like to do.

I finally hit this problem with an NVIDIA GPU and Firefox in Windows, using webgl-prefer-native-gl. It seems that the driver's compiler didn't like my pow function for vec3 (clashes with the built-in pow), so I've renamed it.