who wants the shader to make it possible (^_^)
v.s.1.1
/-----------------------------------------------
ToonShade.VertexShader
Version = v1.1 or Better
Const = 16 or more
Constants Specified bu the Application
c0-c3 = world-veiw-projection (matrix)
c4-c7 = world transform (matrix)
c8-11 = world space position (vector)
c12 = eye direction (vector)
c13 = light direction (vector)
Vertec Components
v0 = position
v3 = normal
v7,8 = texture coord
Copyright (c) 2003 Robert Lettan.
-----------------------------------------------/
; -- declarations ----
dcl_position0 v0
dcl_normal0 v3
dcl_texcoord0 v6
; -- transform position ----
dp4 oPos.x, v0, c0
dp4 oPos.y, v0, c1
dp4 oPos.z, v0, c2
dp4 oPos.w, v0, c3
; -- transform normal ----
dp3 r0.x, v3, c4
dp3 r0.y, v3, c5
dp3 r0.z, v3, c6
; -- normalise normal ----
dp3 r0.w, r0, r0
rsq r0.w, r0.w
mul r0, r0, r0.w
; -- calc world space position ----
dp4 r1.x, v0, c8
dp4 r1.y, v0, c9
dp4 r1.z, v0, c10
dp4 r1.w, v0, c11
; -- normalise eye ----
add r2, c12, -r1 ; add vector from eye point
dp3 r2.w, r2, r2 ; get length
rsq r2.w, r2.w ; square length
mul r2, r2, r2.w ; multiply back with original length
; -- texture calculations ----
dp3 oT1.x, r0, r2 ; apply normal to texture
dp3 oT0.x, r0, c13 ; apply light to texture
now if i feel inclined... perhaps later i'll give the code which will allow this to actually display itself
Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?