SCM Repository
[diderot] Diff of /trunk/test/vr-phong.diderot
Diff of /trunk/test/vr-phong.diderot
Parent Directory
|
Revision Log
|
Patch
36 |
{ |
{ |
37 |
if (inside (pos,F)) { |
if (inside (pos,F)) { |
38 |
real val = F@pos; |
real val = F@pos; |
39 |
vec3 grad = (∇ F)@pos; |
vec3 grad = ∇F@pos; |
40 |
vec3 norm = grad/|grad|; |
vec3 norm = grad/|grad|; |
41 |
vec3 halfDir = (lightDir - dir)/|lightDir - dir|; |
vec3 halfDir = (lightDir - dir)/|lightDir - dir|; |
42 |
vec4 matRGBA = txf@[val]; |
vec4 matRGBA = txf@val; |
43 |
vec3 matRGB = [matRGBA[0],matRGBA[1],matRGBA[2]]; |
vec3 matRGB = [matRGBA[0],matRGBA[1],matRGBA[2]]; |
44 |
real ldotn = dot(lightDir, norm); |
real ldotn = dot(lightDir, norm); |
45 |
real hdotn = dot(halfDir, norm); |
real hdotn = dot(halfDir, norm); |
|
Legend:
Removed from v.383 |
|
changed lines |
|
Added in v.384 |
|
|