Skip to content

Fix shader issues - #2828

Merged
riccardobl merged 5 commits into
jMonkeyEngine:masterfrom
riccardobl:shaderfixes
May 28, 2026
Merged

Fix shader issues#2828
riccardobl merged 5 commits into
jMonkeyEngine:masterfrom
riccardobl:shaderfixes

Conversation

@riccardobl

Copy link
Copy Markdown
Member

Issues found by testing the shaders under angle GLES3

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates several GLSL shaders to prevent implicit type conversion errors by explicitly casting integers to floats, and initializes newly added fields in the Light and PBRSurface structures. The review feedback highlights a few remaining implicit conversion issues in Downsample.frag (lines 27 and 29), suggests simplifying a redundant ternary operation in the calculation of surface.NdotV, recommends comparing the integer layer directly with integer literals instead of casting it to a float, and points out a duplicate assignment of surface.alpha.

Comment thread jme3-effects/src/main/resources/Common/MatDefs/Post/Downsample.frag
@riccardobl
riccardobl merged commit d4d98e2 into jMonkeyEngine:master May 28, 2026
10 checks passed
Copilot AI pushed a commit that referenced this pull request Jul 15, 2026
* Fix GLSL int/float type mismatches in shaders

* fix uninitialized variables

* add defensive initialization

* Fix floating-point in Downsample shader texture sampling

* more fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant