Skip to content

Shadows on forward renderer - #2365

Draft
ada-tv wants to merge 7 commits into
overte-org:masterfrom
ada-tv:feature/forward-shadows
Draft

Shadows on forward renderer#2365
ada-tv wants to merge 7 commits into
overte-org:masterfrom
ada-tv:feature/forward-shadows

Conversation

@ada-tv

@ada-tv ada-tv commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator
  • Shadow pass running before doing forward (and passing the shadow frame to the deferred transparent pass)
  • Shadows rendering (currently reuses the fade params buffer slot)
  • Invalid pipeline pointer crash
  • The rest of the shaders (simple, voxel, etc, model is the prototyping shader since it's the most commonly used one)
  • Figure out what to do with the forward-only ifdef for Android in RenderViewTask
  • Update the settings QML to make the shadow toggle visible on both deferred and forward
  • Fix broken resolution scale setting on forward
  • Fix mirrors using deferred instead of forward
  • Figure out why opaque forward simple doesn't receive shadows but transparent does (maybe something with instancing?)

@ada-tv ada-tv added enhancement New feature or request renderer Issues and feature requests related to the renderer labels Jul 12, 2026
@ada-tv

ada-tv commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

weird crash that only sometimes happens when shadows are enabled

Thread 55 "RenderThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffeb67fc6c0 (LWP 123354)]
gpu::Batch::setPipeline (this=0x7ffea07ace70, 
    pipeline=<error reading variable: Cannot access memory at address 0x8>)
    at /home/ada/src/overte/libraries/gpu/src/gpu/Batch.cpp:400
400	    _currentPipeline = pipeline;
(gdb) bt
#0  gpu::Batch::setPipeline
    (this=0x7ffea07ace70, pipeline=<error reading variable: Cannot access memory at address 0x8>) at /home/ada/src/overte/libraries/gpu/src/gpu/Batch.cpp:400
#1  0x00007ffff58a0412 in render::ShapePlumber::pickPipeline
    (this=<optimized out>, args=0x7ffeb67fb090, key=<optimized out>)
    at /home/ada/src/overte/libraries/render/src/render/ShapePipeline.cpp:166
#2  0x00007ffff58a06c1 in render::ShapePlumber::pickPipeline
    (this=0x5555797d3080, args=args@entry=0x7ffeb67fb090, key=...)
    at /home/ada/src/overte/libraries/render/src/render/ShapePipeline.cpp:153
#3  0x00007ffff586ae9d in renderShape
    (args=args@entry=0x7ffeb67fb090, shapeContext=std::shared_ptr<render::ShapePlumber> (use count 4145, weak count 0) = {...}, item=..., globalKey=...)
    at /usr/include/c++/16/bits/shared_ptr_base.h:1751
#4  0x00007ffff586b1cc in render::renderShapes
    (renderContext=std::shared_ptr<render::RenderContext> (use count 1, weak count 0) = {...}, shapeContext=std::shared_ptr<render::ShapePlumber> (use count 4145, weak count 0) = {...}, inItems=std::vector of length 1, capacity 1 = {...}, maxDrawnItems=maxDrawnItems@entry=-1, globalKey=...)
    at /home/ada/src/overte/libraries/render/src/render/DrawTask.cpp:83
#5  0x00007ffff61a240c in sortAndRenderZPassShapes
    (shapePlumber=<optimized out>, renderContext=<optimized out>, inShapes=std::unordered_map with 7 elements = {...}, itemBounds=std::vector of length 4, capacity 4 = {...})
    at /home/ada/src/overte/build/libraries/render-utils/src/RenderPipelinesInit.cpp:2037
#6  0x00007ffff613e46c in operator() (__closure=0x7ffea10f6170, batch=...)
    at /home/ada/src/overte/libraries/render-utils/src/RenderShadowTask.cpp:255
#7  std::__invoke_impl<void, RenderShadowMap::run(const render::RenderContextPointer&, const Inputs&)::<lambda(gpu::Batch&)>&, gpu::Batch&> (__f=...)
    at /usr/include/c++/16/bits/invoke.h:63
#8  std::__invoke_r<void, RenderShadowMap::run(const render::RenderContextPointer&, const Inputs&)::<lambda(gpu::Batch&)>&, gpu::Batch&> (__fn=...)
    at /usr/include/c++/16/bits/invoke.h:113
#9  std::_Function_handler<void(gpu::Batch&), RenderShadowMap::run(const render::RenderContextPointer&, const Inputs&)::<lambda(gpu::Batch&)> >::_M_invoke(const std::_Any_data &, gpu::Batch &) (__functor=<optimized out>, __args#0=...)
    at /usr/include/c++/16/bits/std_function.h:295
#10 0x00007ffff475e81a in std::function<void(gpu::Batch&)>::operator()
    (this=0x7ffeb67fa1b0, __args#0=<optimized out>)
    at /usr/include/c++/16/bits/std_function.h:581
#11 gpu::doInBatch
    (name=name@entry=0x7ffff61aaf60 "RenderShadowMap::run", context=std::shared_ptr<gpu::Context> (use count 7, weak count 0) = {...}, f=...)
    at /home/ada/src/overte/libraries/gpu/src/gpu/Context.cpp:367
#12 0x00007ffff6140cf2 in RenderShadowMap::run
    (this=0x555583c52860, renderContext=std::shared_ptr<render::RenderContext> (use count 1, weak count 0) = {...}, inputs=<optimized out>)
    at /home/ada/src/overte/libraries/render-utils/src/RenderShadowTask.cpp:234

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

Labels

enhancement New feature or request renderer Issues and feature requests related to the renderer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant