Hi,
I've got problem with writing depth in fragment program. All fragment programs I saw for ShaderLab write only color, but it seems to be possible to output depth too (as I see in HLSL/Cg forums). I've been digging the forum for hours but I still got no idea how to do it. Was trying shader from attachment, but compiler throws such error:
Shader error in 'TestShader': D3D shader assembly failed with: (8): error X2022: scalar registers cannot be masked
Shader Assembly: ps_2_0
; 4 ALU
def c0, 0.00000000, 0, 0, 0
dcl t0
frc r1, t0
mov r0.z, c0.x
Any idea how to make it working ?

Reply With Quote
.