Conversation
…sets - Renamed bloom shader files to remove numeric prefixes and standardized their paths. - Updated `PhysicallyBasedBloomScene` to handle window resizing by reallocating color buffers and re-initializing the bloom renderer. - Reorganized cube and quad vertex data with face-specific comments and improved alignment. - Enabled `GL_CULL_FACE` in the native OpenGL configuration. - Refactored GLSL shaders to remove hardcoded uniform defaults and use explicit type casts (e.g., `float(i)`). - Added a member initialization list to the `PhysicallyBasedBloomScene` constructor. - Improved `BloomRenderer` lifecycle management by setting the initialization flag to false upon destruction.
…sets - Renamed bloom shader files to remove numeric prefixes and standardized their paths. - Updated `PhysicallyBasedBloomScene` to handle window resizing by reallocating color buffers and re-initializing the bloom renderer. - Reorganized cube and quad vertex data with face-specific comments and improved alignment. - Enabled `GL_CULL_FACE` in the native OpenGL configuration. - Refactored GLSL shaders to remove hardcoded uniform defaults and use explicit type casts (e.g., `float(i)`). - Added a member initialization list to the `PhysicallyBasedBloomScene` constructor. - Improved `BloomRenderer` lifecycle management by setting the initialization flag to false upon destruction.
…alculation - Renamed parallax mapping shader assets to a more generic naming convention. - Implemented `renderQuad` in `ParallaxMappingScene.cpp`, including manual calculation of tangent and bitangent vectors for the vertex data. - Configured VAO and VBO with vertex attributes for positions, normals, texture coordinates, tangents, and bitangents. - Disabled model rotation and commented out the debug light source rendering in the draw loop.
- Increase light count from 1 to 4 and initialize their positions and colors. - Update the sphere grid to a 7x7 layout with a spacing of 2.5. - Rename PBR vertex and fragment shaders from `1.2.pbr` to `pbr`. - Disable the explicit rendering of spheres at light source positions. - Apply general code style improvements and formatting cleanup in `PbrScene.cpp`.
- Rename Cascaded Shadow Map (CSM) shader assets to remove numerical prefixes and update references in `CsmScene.cpp`. - Fix geometry shader compilation in `Shader.cpp` by passing the correct shader code size to `glShaderSource`. - Add missing precision qualifiers for `int` and `sampler2DArray` across multiple shader files. - Update `shadow_mapping.frag` to use consistent floating-point literals and fix `textureSize` coordinate access. - Set `mediump` precision for the view matrix in `shadow_mapping.vert`. - Temporarily disable the "scene" tutorial item in `SampleData.kt`.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cbdd18cb7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| uniform sampler2D bloomBlur; | ||
| uniform float exposure; | ||
| uniform float bloomStrength = 0.04f; | ||
| uniform float bloomStrength; |
There was a problem hiding this comment.
Initialize bloomStrength before mixing
When the scene runs with the new default programChoice == 3, draw() binds bloomRenderer.BloomTexture() but only uploads programChoice and exposure; no code sets bloomStrength. Since this commit removed the shader-side initializer, the uniform defaults to 0, so mix(hdrColor, bloomColor, bloomStrength) always returns the original scene color and the physically based bloom path has no visible bloom.
Useful? React with 👍 / 👎.
|
|
||
| uniform bool horizontal; | ||
| uniform float weight[5] = float[] (0.2270270270, 0.1945945946, 0.1216216216, 0.0540540541, 0.0162162162); | ||
| uniform float weight[5]; |
There was a problem hiding this comment.
When programChoice == 2 selects the old blur path, PhysicallyBasedBloomScene::draw() uses this shader but never uploads the weight array. Removing the initializer leaves every weight at the OpenGL default of 0, so result remains black for every ping-pong pass and the final bloom texture contributes nothing.
Useful? React with 👍 / 👎.
| // for (unsigned int i = 0; i < 4; ++i) { | ||
| // glm::vec3 newPos = lightPositions[i]; | ||
| // m_pShader->setVec3("lightPositions[" + std::to_string(i) + "]", newPos); | ||
| // m_pShader->setVec3("lightC | ||
| // olors[" + std::to_string(i) + "]", lightColors[i]); |
There was a problem hiding this comment.
Restore PBR light uniform uploads
With this block commented out, the PBR shader never receives lightPositions or lightColors in either init() or draw(), while pbr.frag still loops over those four uniforms to compute Lo. On GL these uniforms start at zero, so the direct lighting term is effectively removed and the spheres render with only the tiny ambient term.
Useful? React with 👍 / 👎.
No description provided.