diff --git a/CMakeLists.txt b/CMakeLists.txt index b7310d95..d40c3446 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,7 @@ set(HEADER_FILES include/emulator.hpp include/helpers.hpp include/opengl.hpp inc include/PICA/dynapica/shader_rec_emitter_x64.hpp include/PICA/pica_hash.hpp include/result/result.hpp include/result/result_common.hpp include/result/result_fs.hpp include/result/result_fnd.hpp include/result/result_gsp.hpp include/result/result_kernel.hpp include/result/result_os.hpp - include/crypto/aes_engine.hpp include/metaprogramming.hpp + include/crypto/aes_engine.hpp include/metaprogramming.hpp include/PICA/pica_vertex.hpp ) set(THIRD_PARTY_SOURCE_FILES third_party/imgui/imgui.cpp diff --git a/include/PICA/pica_vertex.hpp b/include/PICA/pica_vertex.hpp index 23fc8393..ea90796b 100644 --- a/include/PICA/pica_vertex.hpp +++ b/include/PICA/pica_vertex.hpp @@ -28,7 +28,8 @@ struct PicaVertex { }; PicaVertex() {} }; -//Float is used here instead of Floats::f24 to ensure that Floats::f24 is properly sized for direct interpretations as a float by the render backend + +// Float is used here instead of Floats::f24 to ensure that Floats::f24 is properly sized for direct interpretations as a float by the render backend #define ASSERT_POS(member, pos) static_assert(offsetof(PicaVertex, s.member) == pos * sizeof(float), "PicaVertex struct is broken!"); ASSERT_POS(positions, 0) diff --git a/src/core/PICA/gpu.cpp b/src/core/PICA/gpu.cpp index e90e814e..99e5221f 100644 --- a/src/core/PICA/gpu.cpp +++ b/src/core/PICA/gpu.cpp @@ -247,7 +247,7 @@ void GPU::drawArrays() { shaderUnit.vs.run(); } - PicaVertex &out=vertices[i]; + PicaVertex& out = vertices[i]; // Map shader outputs to fixed function properties const u32 totalShaderOutputs = regs[PICA::InternalRegs::ShaderOutputCount] & 7; for (int i = 0; i < totalShaderOutputs; i++) { diff --git a/src/core/renderer_gl/renderer_gl.cpp b/src/core/renderer_gl/renderer_gl.cpp index 863ec676..fe28c19a 100644 --- a/src/core/renderer_gl/renderer_gl.cpp +++ b/src/core/renderer_gl/renderer_gl.cpp @@ -189,10 +189,12 @@ const char* fragmentShader = R"( return result; } + void calcLighting(out vec4 primary_color, out vec4 secondary_color){ - primary_color = vec4(vec3(0.0),1.0); - secondary_color = vec4(vec3(0.0),1.0); + primary_color = vec4(vec3(0.5) ,1.0); + secondary_color = vec4(vec3(0.5) ,1.0); } + void main() { vec2 tex2UV = (u_textureConfig & (1u << 13)) != 0u ? v_texcoord1 : v_texcoord2;