View Single Post
Old 10-15-13, 01:48 PM   #77
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by makman94 View Post
you mean that with your dll we can have more than one shaders on the water at the same time?
No, my widescreen d3d9.dll decodes at runtime the vertex/pixel shader from memory and writes it as shader assembly code into txt-files. Once these txt-files are available, the SH3 engine uses the shader code from these files and not the hard-coded. At current work status only the shader instructions can be changed by editing the txt-file, no new variables or textures can be passed every (x) frame to the shaders.

the SH3 ocean pixel shader for example:
Code:
    ps_1_1
    tex t0                            
    texbem t1, t0                  
    mad t1, t1, c0.w, c1.w     
    dp3_sat r0, v0_bx2, t0
    lrp r0.xyz, r0.w, c0, c1
    lrp r0.xyz, v0.w, t1, r0
  + mov r0.w, t0.w
// approximately 6 instruction slots used (2 texture, 4 arithmetic)
And yet there is a shader for clouds but only a vertex shader. I assume it is used to calculate the mapping of cloud textures on the 3D cloud dome.
__________________
--
Vapor-ware is always easier to sell because there's no limit what it can do!
Seeadler is offline   Reply With Quote