Skip to content

Conversation

@zzuegg
Copy link
Member

@zzuegg zzuegg commented Jan 26, 2026

Reference text on why it performs slightly better: https://wallisc.github.io/rendering/2021/04/18/Fullscreen-Pass.html
Maybe not worth it, but i noticed measurable results when using calculation heavy shaders
Just run the local tests to verify it is working.

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

🖼️ Screenshot tests have failed.

The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.

📄 Where to find the report:

  • Go to the (failed run) > Summary > Artifacts > screenshot-test-report
  • Download the zip and open jme3-screenshot-tests/build/reports/ScreenshotDiffReport.html

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".

See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information

Contact @richardTingle (aka richtea) for guidance if required

@riccardobl
Copy link
Member

riccardobl commented Jan 26, 2026

i think there is the possibility that this might cause issues for existing apps assuming filters run on quads, can you make this configurable?

@zzuegg
Copy link
Member Author

zzuegg commented Jan 26, 2026

Yeah, i see the point, since the previous vertex shader did the position transform, any filter that does not use jme's stock vertex shader fails.

Making the java side configurable should be quite easy. Have to think about the gl side.

First i am going to explore why post water fails, then i look into making it configurable.

@zzuegg
Copy link
Member Author

zzuegg commented Jan 26, 2026

I reverted the shaders to stock and modified the meshes positions to get the correct result after transformation.
Don't know why it messes up the failing tests, but i guess there are some slight differences when interpolating the texture coordinates and as a result getting the interpolated result from the texture read. At least that is the only reason i can imagine.
I have investigated some of the pixels in question in the test post water.
the difference is actually: 51:65:88 vs 52:65:88 (rgb pixel id:235x230) for example.

Very likely i am not able to fix that. Of course, once i add a switch to the fpp this issue is gone since i will default to the original quad i guess?

@riccardobl
Copy link
Member

Yes, better to default to the quad and leave this only as an optional performance setting.
But if you are talking about the failing screenshot tests, i think they are outdated for other commits that have been merged to the master.

@zzuegg
Copy link
Member Author

zzuegg commented Jan 26, 2026

I added a secondary constructor allowing to switch on the triangle, not sure if allowing runtime switches trough a setter is a good idea because i remember i cloned that quad previously myself. But if you like that better then a second constructor i am fine with it too.
added the boolean also the the serializing code

@riccardobl
Copy link
Member

the constructor is perfect, thanks

@zzuegg
Copy link
Member Author

zzuegg commented Jan 26, 2026

ok, ill add some tests if wanted in the next days

private static final float[] POSITIONS = {
0, 0, 0, // -1 -1 0 after vertex shader transform
2, 0, 0, // 3 -1 0 after vertex shader transform
0, 2, 0 // -1 3 0 after vertex shader transform
Copy link
Member

Choose a reason for hiding this comment

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

💯

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.

2 participants