Welcome,this is a gpu render by byhj. I write it by using OpenGL3+ and Direct3D11. I classify this project by the book of real-time rending.
The whole project will be three parts:
This part is the render base code. It has resource(texture, model, audio) manager and the render framework.
The sample part include OpenGL3+ and DirectX11 Sample code. I also write the base supprot for Next GPU API (Direct3D12 & Vulkan).
The utility part show the important extensions : camera, gui, font, audio, meshload, texture, window, script, resource
OpenGL: For the shader effect, the opengl3+ will need, the shader file will be:
- .vert : GL_VERTEX_SHADER
- .tcs : GL_TESS_CONTROL_SHADER
- .tes : GL_TESS_EVALUATION_SHADER
- .geom : GL_GEOMETRY_SHADER
- .farg : GL_FRAGMENT_SHADER
- .comp : GL_COMPUTE_SHADER Your can use NShader to make shader file heightlight.
Direct3D:
The D3DX is not include since Windows8+, so the d3dx support part is use old directx11 sdk. For more information about d3dx obsolete, read the Living without D3DX.
The direct3d shader file will be:
- .vsh: D3D_VERTEX_SHADER
- .hsh: D3D_HULL_SHADER
- .dsh: D3D_DOMAIN_SHADER
- .gsh: D3D_GEOMETRY_SHADER
- .psh: D3D_PIXEL_SHADER
- .csh: D3D_COMPUTE_SHADER
Vulkan: Vulkan is the next gpu api, more information read the Vulkan
Visual Studio 2015 (I will write the cmake file in the future). I provide the (x86) dependences file only. Your can build the dependences by yourself.
- Vulkan SDK
- Direct3D12 For the DirectX12, your need the Win10SDK
-
Make sure you develop environment is right. I write some code by c++ 11, so the compiler should support the c++11, use vs2015 will be the best choice or modifed by yourself if you use other compilers.
-
Project Organization:
|Root
|-- include
|-- src
|-- media
|-- lib
|-- extern
|-- doc
|Output
|-- bin(Execute Dir)
|-- temp(temp file we possibly not need)
Notice: .props file is the command properties file, it set up the develop environment easily.
--- --- ---
Use Geometry Shader to make billboard. The shader code is base the OpenGL Step by Step Tutorial27
Use gaussian blur to make the bloom effect. The detail tutorial read on Learning OpenGL
Use height map to make the terrain. Then, use slope based texturing to make grass and rock effect.
---
---
---
--- ## Layer Rendering (OpenGL3+)
---