Skip to content

Devel - #3778

Merged
paroj merged 8 commits into
OGRECave:masterfrom
paroj:devel
Oct 28, 2026
Merged

Devel#3778
paroj merged 8 commits into
OGRECave:masterfrom
paroj:devel

Conversation

@paroj

@paroj paroj commented Oct 28, 2026

Copy link
Copy Markdown
Member

No description provided.

paroj added 8 commits October 28, 2026 18:57
On touch screens the swords could not be taken out or put back, as that
needs the Q key. Make a double tap do that. A single tap therefore acts
once it can no longer become a double tap, as the jump it starts would
otherwise prevent drawing the swords.
The shadow mapping sub render state was added by hand, calling
preAddToRenderState directly and ignoring its result. Link it from a
template render state instead, like the other sub render states.
The scheme render state and the custom render state of a pass were
linked one after the other, calling preAddToRenderState for each sub
render state as it was added. A custom lighting_stage then replaced
the Cook-Torrance lighting of the scheme after image based lighting
had already accepted the pass, which failed later with
"image_based_lighting must be used with the metal_roughness SRS" for
every material that overrides the lighting stage. Replaced sub render
states also left the texture units they added in the pass.

Merge the custom render state into the scheme render state first and
link the result, calling preAddToRenderState only once the overrides
are resolved. Image based lighting now skips passes without
Cook-Torrance lighting. The public interface is unchanged.
The lookup table was only used if some material had already created
the texture, like the filament sample material. Otherwise the pass got
an empty texture unit and image based lighting produced garbage, e.g.
in the Emscripten sample, which does not ship that material. Load the
table from the internal resource group, where it is located.
Ogre reports errors with exceptions and recovers from some of them,
e.g. when a cube map is stored as one file per face. Emscripten only
catches exceptions in code compiled with exception handling, but only
the sample enabled it, at link time, so any exception aborted the
application.

Compile Ogre and its dependencies with WebAssembly exception handling,
which also covers setjmp/longjmp in freetype. It increases the size of
the sample code by about 8%, while the JavaScript based exception
handling increases it by 23%. Existing build directories must rebuild
their dependencies.
Replace the plain background, the point light and the grey modulative
shadows with a sky box, a sun, soft integrated shadows and physically
based lighting that reflects the sky. The physically based variants of
Sinbad's materials are in SinbadPBR.material, as other samples use the
original ones. The floor now extends into the fog, so its edge is no
longer visible. The lights are balanced to stay below clipping without
tone mapping while keeping the shadows visible. The Emscripten sample
ships the sky and the materials as well.
@paroj
paroj merged commit d04932c into OGRECave:master Oct 28, 2026
6 checks passed
@paroj
paroj deleted the devel branch October 28, 2026 23:21
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