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

Method LoadShaders

BakingLab/MeshRenderer.cpp:243–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void MeshRenderer::LoadShaders()
244{
245 // Load the mesh shaders
246 meshDepthVS = CompileVSFromFile(device, L"DepthOnly.hlsl", "VS", "vs_5_0");
247 meshVS = CompileVSFromFile(device, L"Mesh.hlsl", "VS", "vs_5_0");
248 meshPS = CompilePSFromFile(device, L"Mesh.hlsl", "PS", "ps_5_0");
249
250 areaLightVS = CompileVSFromFile(device, L"AreaLight.hlsl", "VS", "vs_5_0");
251 areaLightPS = CompilePSFromFile(device, L"AreaLight.hlsl", "PS", "ps_5_0");
252
253 visualizerVS = CompileVSFromFile(device, L"BakeDataVisualizer.hlsl", "VS", "vs_5_0");
254 visualizerPS = CompilePSFromFile(device, L"BakeDataVisualizer.hlsl", "PS", "ps_5_0");
255
256 fullScreenVS = CompileVSFromFile(device, L"EVSMConvert.hlsl", "FullScreenVS");
257
258 CompileOptions opts;
259 opts.Add("MSAASamples_", ShadowMSAASamples);
260 evsmConvertPS = CompilePSFromFile(device, L"EVSMConvert.hlsl", "ConvertToEVSM", "ps_5_0", opts);
261
262 opts.Reset();
263 opts.Add("Horizontal_", 1);
264 opts.Add("Vertical_", 0);
265 opts.Add("SampleRadius_", SampleRadius);
266 evsmBlurH = CompilePSFromFile(device, L"EVSMConvert.hlsl", "BlurEVSM", "ps_5_0", opts);
267
268 opts.Reset();
269 opts.Add("Horizontal_", 0);
270 opts.Add("Vertical_", 1);
271 opts.Add("SampleRadius_", SampleRadius);
272 evsmBlurV = CompilePSFromFile(device, L"EVSMConvert.hlsl", "BlurEVSM", "ps_5_0", opts);
273
274 opts.Reset();
275 opts.Add("MSAA_", 0);
276 depthReductionInitialCS[0] = CompileCSFromFile(device, L"DepthReduction.hlsl", "DepthReductionInitialCS", "cs_5_0", opts);
277
278 opts.Reset();
279 opts.Add("MSAA_", 1);
280 depthReductionInitialCS[1] = CompileCSFromFile(device, L"DepthReduction.hlsl", "DepthReductionInitialCS", "cs_5_0", opts);
281
282 depthReductionCS = CompileCSFromFile(device, L"DepthReduction.hlsl", "DepthReductionCS");
283}
284
285void MeshRenderer::CreateShadowMaps()
286{

Callers

nothing calls this directly

Calls 5

CompileVSFromFileFunction · 0.85
CompilePSFromFileFunction · 0.85
CompileCSFromFileFunction · 0.85
AddMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected