Skip to content
This repository has been archived by the owner on Feb 14, 2025. It is now read-only.

Commit

Permalink
Bump to SM5
Browse files Browse the repository at this point in the history
  • Loading branch information
Greavesy1899 committed Nov 29, 2024
1 parent 4b98e74 commit 9e5ed2b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
30 changes: 15 additions & 15 deletions Mafia2Libs/Rendering/Graphics/ShaderManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,45 @@ public bool Init(ID3D11Device device)
// construct default shader
ShaderInitParams DefaultInitParams = new ShaderInitParams();
DefaultInitParams.Elements = VertexLayouts.NormalLayout.GetLayout();
DefaultInitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightPS.hlsl", "LightPixelShader", "ps_4_0");
DefaultInitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightVertexShader", "vs_4_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_4_0");
DefaultInitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightPS.hlsl", "LightPixelShader", "ps_5_0");
DefaultInitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightVertexShader", "vs_5_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_5_0");

DefaultShader OurDefaultShader = new DefaultShader(device, DefaultInitParams);

// construct debug shader
ShaderInitParams DebugInitParams = new ShaderInitParams();
DebugInitParams.Elements = VertexLayouts.BasicLayout.GetLayout();
DebugInitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("DebugPS.hlsl", "DebugPixelShader", "ps_4_0");
DebugInitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("DebugVS.hlsl", "DebugVertexShader", "vs_4_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_4_0");
DebugInitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("DebugPS.hlsl", "DebugPixelShader", "ps_5_0");
DebugInitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("DebugVS.hlsl", "DebugVertexShader", "vs_5_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_5_0");

DebugShader OurDebugShader = new DebugShader(device, DebugInitParams);

// construct collision shader
ShaderInitParams CollisionInitParams = new ShaderInitParams();
CollisionInitParams.Elements = VertexLayouts.CollisionLayout.GetLayout();
CollisionInitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("CollisionPS.hlsl", "CollisionShader", "ps_4_0");
CollisionInitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("CollisionVS.hlsl", "CollisionShader", "vs_4_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_4_0");
CollisionInitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("CollisionPS.hlsl", "CollisionShader", "ps_5_0");
CollisionInitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("CollisionVS.hlsl", "CollisionShader", "vs_5_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_5_0");

CollisionShader OurCollisionShader = new CollisionShader(device, CollisionInitParams);

// construct shader_601151254 shader
ShaderInitParams Shader601151254_InitParams = new ShaderInitParams();
Shader601151254_InitParams.Elements = VertexLayouts.NormalLayout.GetLayout();
Shader601151254_InitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightPS.hlsl", "PS_601151254", "ps_4_0");
Shader601151254_InitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightVertexShader", "vs_4_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_4_0");
Shader601151254_InitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightPS.hlsl", "PS_601151254", "ps_5_0");
Shader601151254_InitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightVertexShader", "vs_5_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_5_0");

Shader_601151254 OurShader601151254 = new Shader_601151254(device, Shader601151254_InitParams);

// construct shader_50760736 shader
ShaderInitParams Shader_50760736_InitParams = new ShaderInitParams();
Shader_50760736_InitParams.Elements = VertexLayouts.NormalLayout.GetLayout();
Shader_50760736_InitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightPS.hlsl", "PS_50760736", "ps_4_0");
Shader_50760736_InitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightVertexShader", "vs_4_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_4_0");
Shader_50760736_InitParams.PixelShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightPS.hlsl", "PS_50760736", "ps_5_0");
Shader_50760736_InitParams.VertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightVertexShader", "vs_5_0");
DefaultInitParams.InstancedVertexShaderFile = new ShaderInitParams.ShaderFileEntryPoint("LightVS.hlsl", "LightInstanceVertexShader", "vs_5_0");

Shader_50760736 OurShader50760736 = new Shader_50760736(device, Shader_50760736_InitParams);

Expand Down
6 changes: 3 additions & 3 deletions Mafia2Libs/Rendering/Graphics/Shaders/BaseShader.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System;
using Rendering.Core;
using Rendering.Core;
using ResourceTypes.Materials;
using System.Drawing;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Windows;
using Utils.Logging;
using Vortice.D3DCompiler;
using Vortice.Direct3D;
using Vortice.Direct3D11;
Expand Down Expand Up @@ -378,6 +377,7 @@ public Blob ConstructBytecode(ShaderInitParams.ShaderFileEntryPoint ShaderFileDa
if(OurErrorcode != null)
{
Error = OurErrorcode.ConvertToString();
Log.WriteLine(string.Format("DX11 Compiler Error: {0}", Error), LoggingTypes.ERROR, LogCategoryTypes.APPLICATION);
}

return OurBytecode;
Expand Down

0 comments on commit 9e5ed2b

Please sign in to comment.