Nathcat / Nathcats-Game-Engine

0 stars 0 forks source link

Shader handling #3

Closed Nathcat closed 2 years ago

Nathcat commented 2 years ago

The game engine should offer the ability to write custom shaders, which means that the user will have to be able to create their own input layouts. Although the processing of the shaders should be the same.

Nathcat commented 2 years ago

Shaders are contained in the materials that are attached to the MeshRenderer of an object, so we should create the MATERIAL class first.

Nathcat commented 2 years ago

The Material class should have its parameters defined by the Shader program that is linked to it. This will be done by using the DXGI_FORMAT attribute of the D3D11_INPUT_ELEMENT_DESC structs that are contained in the Shader class.