AndreasFSC
Too much going on...
-I have had this feature in one of my versions. The idea is to cut of all negative values in one variable.Shadows In TV Cockpit="1" (in your *.PLR file) ?
I thought I read "AI draft".
- If we get rid of the upper (unusefull) part of the specular on the all the shaders we gain some performance?
This SRPL dont have it. (still goes through)
It probably was lost in some of the early big changes, but can probably be added again if there is room for it in the shaders. It will probably only have a very small impact on fps.
So it is achievable. Can we have it for all the shaders that use specular?
This is your (same as SRPL?) Cube map spec map T1 leting specular goes through, then we wonder wht it looks cartoonish. No wonder why car dont have any sun reflection:
View attachment 520328
It doesn't look like this at all in Race 07 (or are you referring to the drop shadow only?)
A shader does not know what happens around it unless there is some ray tracing (I don't know much about how that works, and that is a different generation of graphics).
A simple standard diffuse example is:
1. get material normal direction for a pixel,
2. compare how much "equal" the normal is to the direction of light (a vector pointing towards light). If the normal points 75% towards the light the point will be 75% lit = multiply material rgb by 0.75.
3. Add ambient light.
For specular light viewing angle is compared to sun angle/direction at the material normal. The more sun angle and view angle are at reflection angle (compared to each others, on material) the more specular light. This specular value can be added to the earlier diffuse calculation. All this and other things like cube are added in different ways to a final value (0 - 1) for one pixel output.
The shader is no camera as one might think of it, and it can't actually "see".
The only way for the shader to know if there is a shadow on a pixel is to first draw the whole scene from sun position. If the point (its depth) is behind one other calculated pixel it is considered in shadow and this has to be sent to a shadow map before the other things are calculated.
This is the hard part, to make the game do one shadow calculation before every "standard" frame, and send it as input to the other shaders to check each pixel.
I don't use SRPL shaders but updated standard shaders as a base (one fog calculation is from SRPL and one diffuse to bumpmap conversion), but most of the "reloaded" shaders are completely remade now.
Last edited: