Ok, truly bizarre.
I've just rewrote the shader, replacing the last line of the pixel shader to only output the stage 0 texture with ambient lighting. In my test code this is displayed as expected. In my game code there is no change, the normal maps still appear as a texture, very slowly scrolling across the plane. The effect seems to exist but the shader is doing something odd....My instinct...which is so often wrong...is the shader is fine, its implementation isn't.
This is how I initiate the shader. Anyone see anything stupid? I can't.
make object plain TRN_seaobject, object size x(TRN_obj), object size z(TRN_obj)
position object TRN_seaobject, 0, TRN_sealevel*0.6-0.1, 0
xrotate object TRN_seaobject, 90
if texturetype$ = "C4"
load image "images\terrain\brownskytop.png", 7
else
load image "images\terrain\skytop.png", 7
endif
load image "images\terrain\waternorm1.bmp", 8
load image "images\terrain\waternorm2.bmp", 9
load image "images\terrain\waterspec1.bmp", 10
load image "images\terrain\waterspec2.bmp", 11
texture object TRN_seaobject, 0, 7
texture object TRN_seaobject, 1, 8
texture object TRN_seaobject, 2, 9
texture object TRN_seaobject, 3, 10
texture object TRN_seaobject, 4, 11
rem convert object fvf TRN_seaobject, 530 - This line I've tried but makes no difference.
if effect exist(2)=0 then load effect "shaders\watershader.fx", 2, 0
set object effect TRN_seaobject, 2
set effect constant float 2, "camx", 300 rem camera position x()
set effect constant float 2, "camy", 300 rem camera position y()
set effect constant float 2, "camz", 300 rem camera position z()
GrumpyOne - the natural state of the programmer