Well, I'm playing with the shaders. Serdar wants feedback on the Forums; this seems like the place
I have almost finished my first major task; using specular values as a cap to specular values, so that we don't have OMG BRIGHT on all our shiny things.
I just watched the code compile on a very simple brute-force clamp I wrote, after hours of futile struggle... until I looked up the HLSL spec and found something important enough I thought I'd share.
The code for all the shaders is compiling using Pixel Shader 2.0. Not 2.0a (which is practically any card that can run this game in DirectX 9.0, let alone anything higher). This is a severe and rather arbitrary cut-off; it means you can only use 64 instructions in your code!
Why the bar was set that low, I don't know, but it's a fairly easy fix. I thought I'd let my fellow hackers know about this silly issue right away; it saves a lot of time (and cursing) if you can write up to 512 instructions, and there's no point in worrying about whether players can use it, because if they can run the game with decent framerates in DX9, they have a card that is already PS2.X compliant.
Hope that was useful to a few folks.
I have almost finished my first major task; using specular values as a cap to specular values, so that we don't have OMG BRIGHT on all our shiny things.
I just watched the code compile on a very simple brute-force clamp I wrote, after hours of futile struggle... until I looked up the HLSL spec and found something important enough I thought I'd share.
The code for all the shaders is compiling using Pixel Shader 2.0. Not 2.0a (which is practically any card that can run this game in DirectX 9.0, let alone anything higher). This is a severe and rather arbitrary cut-off; it means you can only use 64 instructions in your code!
Why the bar was set that low, I don't know, but it's a fairly easy fix. I thought I'd let my fellow hackers know about this silly issue right away; it saves a lot of time (and cursing) if you can write up to 512 instructions, and there's no point in worrying about whether players can use it, because if they can run the game with decent framerates in DX9, they have a card that is already PS2.X compliant.
Hope that was useful to a few folks.