From f4b01e9c3fc47196a1b3524afba9794127f3d1b6 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Thu, 21 Jun 2018 17:08:47 -1000 Subject: [PATCH] Fix AMD crash with instanced particle shaders --- Runtime/Graphics/Shaders/CElementGenShadersGLSL.cpp | 9 ++++++--- Runtime/World/CScriptSpawnPoint.cpp | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Runtime/Graphics/Shaders/CElementGenShadersGLSL.cpp b/Runtime/Graphics/Shaders/CElementGenShadersGLSL.cpp index 460e678b8..02b7db4e5 100644 --- a/Runtime/Graphics/Shaders/CElementGenShadersGLSL.cpp +++ b/Runtime/Graphics/Shaders/CElementGenShadersGLSL.cpp @@ -30,9 +30,10 @@ BOO_GLSL_BINDING_HEAD "SBINDING(0) out VertToFrag vtf;\n" "void main()\n" "{\n" +" vec4 pos = posIn[gl_VertexID];\n" " vtf.color = colorIn * moduColor;\n" " vtf.uv = uvsIn[gl_VertexID].xy;\n" -" gl_Position = mvp * posIn[gl_VertexID];\n" +" gl_Position = mvp * pos;\n" "}\n"; static const char* FS_GLSL_TEX = @@ -95,11 +96,12 @@ BOO_GLSL_BINDING_HEAD "SBINDING(0) out VertToFrag vtf;\n" "void main()\n" "{\n" +" vec4 pos = posIn[gl_VertexID];\n" " vtf.color = colorIn * moduColor;\n" " vtf.uvScene = uvsInScene;\n" " vtf.uvTexr = uvsInTexrTind[gl_VertexID].xy;\n" " vtf.uvTind = uvsInTexrTind[gl_VertexID].zw;\n" -" gl_Position = mvp * posIn[gl_VertexID];\n" +" gl_Position = mvp * pos;\n" " gl_Position = FLIPFROMGL(gl_Position);\n" "}\n"; @@ -170,8 +172,9 @@ BOO_GLSL_BINDING_HEAD "SBINDING(0) out VertToFrag vtf;\n" "void main()\n" "{\n" +" vec4 pos = posIn[gl_VertexID];\n" " vtf.color = colorIn * moduColor;\n" -" gl_Position = mvp * posIn[gl_VertexID];\n" +" gl_Position = mvp * pos;\n" "}\n"; static const char* FS_GLSL_NOTEX = diff --git a/Runtime/World/CScriptSpawnPoint.cpp b/Runtime/World/CScriptSpawnPoint.cpp index fe140d457..62f38c4e1 100644 --- a/Runtime/World/CScriptSpawnPoint.cpp +++ b/Runtime/World/CScriptSpawnPoint.cpp @@ -16,6 +16,7 @@ CScriptSpawnPoint::CScriptSpawnPoint(TUniqueId uid, std::string_view name, const x64_itemCounts[int(CPlayerState::EItemType::ThermalVisor)] = 1; x64_itemCounts[int(CPlayerState::EItemType::XRayVisor)] = 1; x64_itemCounts[int(CPlayerState::EItemType::GrappleBeam)] = 1; + x64_itemCounts[int(CPlayerState::EItemType::BoostBall)] = 1; x10c_24_firstSpawn = defaultSpawn; x10c_25_morphed = morphed; }