ooh oh oh Shaders??
Erm well no, i keep running into problems similar to my camera code - not sure what is wrong with DB pro but it seems to want not to recognise ALOT of type-structures, and is begining to bug me.
anyways here's a basic shader you can save from notepad into whatever format but it'll be read as a shader.
; VS start
vs.1.1 ;version 1.1 Vertex Shader
; vertex variables
dcl_position0 v0
dcl_normal0 v3
dcl_texcoord0 v6
; Transform to view (using 4x4 matrix)
m4x4 r9, v0, c12
; Transform to projection (using 4x4 matrix)
m4x4 r10, r9, c28
; Store output position
mov oPos, r10
; Light Calc
dp3 r1.x, v3, c20 ; dot point light
mul r0, r1.x, c21 ; diffuse multiply
add oD0, r0, c22 ; ambience
; Copy tex coords
mov oT0.xy, v6
; fog base
add r0.x, -r9.z, c23.y
mul r0.x, r0.x, c23.z
max r0.x, r0.x, c0.x ; fog between > 0.0 and < 1.0
min oFog, r0.x, c1.x
------------------------------------------------
; VS Action
vs.1.1 ; vertex shader 1.1
; Vertex variables
dcl_position0 v0
dcl_normal0 v3
dcl_texcoord0 v6
; Transform to view space
m4x4 r9, v0, c12
; Transform to projection (using 4x4 matrix)
m4x4 r10, r9, c28
; Store output position (using 4x4 matrix)
mov oPos, r10
; Light calc
dp3 r1.x, v3, c20 ; dot point light
max r1, r1.x, c0.x ; when dot < 0 then dot = 0
mul r0, r1.x, c21 ; diffuse multiply
add r0, r0, c22 ; ambience
min oD0, r0, c1.x ; keep if > 1
; Generate texture coordinates
mul r0.xy, c24.x, r9.xz
add oT0.xy, r0.xy, c24.zw
; fog base
add r0.x, -r9.z, c23.y
mul r0.x, r0.x, c23.z
max r0.x, r0.x, c0.x ; fog to > 0.0 and < 1.0
min oFog, r0.x, c1.x
what this shader will do is take a floor (can work with objects as well but not as good) and put an underwater appearance on it ... i might make a full one viable with outdoor for clouds or something.
but i'll try perhaps to get the demo working cause it is annoying that it doesn't, always error #10086 or soemthing
Anata aru kowagaru no watashi! 