MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / LoadShaders

Method LoadShaders

BindlessDeferred/MeshRenderer.cpp:131–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void MeshRenderer::LoadShaders()
132{
133 // Load the mesh shaders
134 meshDepthVS = CompileFromFile(L"DepthOnly.hlsl", "VS", ShaderType::Vertex, ShaderProfile::SM51);
135
136 CompileOptions opts;
137 opts.Add("NumMaterialTextures_", uint32(model->MaterialTextures().Count()));
138 opts.Add("OutputUVGradients_", 1);
139 meshVS = CompileFromFile(L"Mesh.hlsl", "VS", ShaderType::Vertex, ShaderProfile::SM51, opts);
140 meshPSForward = CompileFromFile(L"Mesh.hlsl", "PSForward", ShaderType::Pixel, ShaderProfile::SM51, opts);
141 meshPSGBuffer[0] = CompileFromFile(L"Mesh.hlsl", "PSGBuffer", ShaderType::Pixel, ShaderProfile::SM51, opts);
142
143 opts.Reset();
144 opts.Add("NumMaterialTextures_", uint32(model->MaterialTextures().Count()));
145 opts.Add("OutputUVGradients_", 0);
146 meshPSGBuffer[1] = CompileFromFile(L"Mesh.hlsl", "PSGBuffer", ShaderType::Pixel, ShaderProfile::SM51, opts);
147}
148
149// Loads resources
150void MeshRenderer::Initialize(const Model* model_)

Callers

nothing calls this directly

Calls 4

CompileFromFileFunction · 0.85
AddMethod · 0.45
CountMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected