OpenXRay / xray-16

Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. Join OpenXRay! ;)
https://discord.gg/sjRMQwv
Other
2.98k stars 456 forks source link

Fixed function pipeline (renderer) #1313

Open Xottab-DUTY opened 1 year ago

Xottab-DUTY commented 1 year ago

We now want to restore FFP support in the renderer. The benefits are:

  1. Possibility to use RTX Remix with it, which will add raytracing support (#1314).
  2. Possibility to port it to OpenGL (#280), so it can run on even older GPUs and about anywhere.
johncurley commented 1 year ago

I wonder if clouds can be replicated using DirectX's volumetric fog or something. Here's an article for OpenGL that shows how to do it without shaders but we can probably replicate that for DirectX.

https://vvise.iat.sfu.ca/user/data/papers/clouds.pdf

That's a very simple example with a bounding box. Another algorithm that is more advanced seems to be using a particle queue:

http://www.markmark.net/PDFs/RTCloudsForGames_HarrisGDC2002.pdf

johncurley commented 1 year ago

Here's another library of tutorials and fixed pipeline algorithms we can use to help us with the fixed pipeline renderers:

https://www.flipcode.com/archives/articles.shtml

DirectX9 fixed pipeline tutorials.

http://www.directxtutorial.com/LessonList.aspx?listid=9

Xottab-DUTY commented 1 year ago

Useful links: https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dtextureop https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dta https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3d9types/ne-d3d9types-_d3drenderstatetype https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dtexturestagestatetype https://learn.microsoft.com/en-us/windows/win32/direct3d9/per-vertex-color-state https://learn.microsoft.com/en-us/windows/win32/direct3d9/lighting-state https://learn.microsoft.com/en-us/windows/win32/direct3d9/mathematics-of-lighting https://learn.microsoft.com/en-us/windows/win32/direct3d9/diffuse-lighting https://learn.microsoft.com/en-us/windows/win32/direct3d9/specular-lighting https://learn.microsoft.com/en-us/windows/win32/direct3d9/camera-space-transformations

https://gamedev.ru/code/forum/?id=50249&page=2 http://www.gamedev.ru/code/forum/?id=59120 https://www.gamedev.net/forums/topic/590483-how-to-use-d3dta_tfactor/4746089/

Xottab-DUTY commented 12 months ago

TODO

Look at these later: