View Single Post
Old 04-14-11, 07:52 AM   #1
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by Rubini View Post
The hard point is that the ocean isnīt a "visible" 3D object on sh3 files, so we canīt put on it the dynamicsShadows controller...so my question is : with the Seeadler's input above (ocean pixel shaders) we can have again some hope to have shadows cast on the water?
Maybe!

In my widescreen dll I have hooked the DirectX function CreatePixelShader() and then dissassembled the buffer with the actual pixelshader code and dump it in a text file. Now I have every hardcoded pixel shader of SH3 as asm shader source code in separate files.

Unbelievable but SH3 uses only 5 pixel shaders

1 = shadow shader
2 = water reflection shader
3 = water shader
4 = terrain shader
5 = ??????

in comparison SH4 approx 200


Quote:
Originally Posted by Rubini View Post
Yes itīs true. If we could change the water pixel shader perhaps we could have finally transparent water! Yeah!
Now in a second step I loaded this simple asm shader code

Code:
ps.1.1
tex t0 
mov r0, t0
from a file into the buffer and replaced the hardcoded water shader with it. This shader code simply takes the texture stored in register t0 and moves it to the output register r0



This is just a proof of concept to change the pixel shaders in SH3 from external files such in SH4/5. It needs allot more work, ...extend to shader version 2.0, make use of more texture registers, storing own textures in the registers and so on...
Seeadler is offline   Reply With Quote