OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Idea about shadows


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
wernerM
User


Joined: 06 Feb 2013
Posts: 66

PostPosted: Wed Sep 06, 2017 8:55 am    Post subject:
Idea about shadows
Reply with quote

Hi all,

today I come over with an idea about avoiding an additional render pass
for creating shadows.
I highly appreciate any comments and maybe hints before I start with a
trial implementation.

I use deferred shading and my scene gets rendered in a prerender pass in
order to get
i.e. a depth map for various effects like ambient occlusion.
I'd also like calculating shadows. The usual approach is adding an
additional render pass
with a camera located at the light position. This gives the depth
texture from the light point.

In the final shading pass, done from the final camera position,  I need
a matrix for calculating
the actual positions depth from light point and compare it with the
shadow maps depth.

So I think I could do some comparable calculation in my prerender pass
and create a shadow map
manually without having the shadowmap prerender pass even when the
actual camera position
isn't at light position. This would be a very welcome speedup.

Maybe I'm misleaded. So please kindly comment.

Thank you



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 337

PostPosted: Wed Sep 06, 2017 3:02 pm    Post subject:
Re: Idea about shadows
Reply with quote

I don't think it's possible:
Shadowmapping need occlusion information that you cannot have without a prepass from light point of view
https://gamedev.stackexchange.com/questions/25436/shadows-in-deferred-rendering
wernerM wrote:
Hi all,

today I come over with an idea about avoiding an additional render pass
for creating shadows.
I highly appreciate any comments and maybe hints before I start with a
trial implementation.

I use deferred shading and my scene gets rendered in a prerender pass in
order to get
i.e. a depth map for various effects like ambient occlusion.
I'd also like calculating shadows. The usual approach is adding an
additional render pass
with a camera located at the light position. This gives the depth
texture from the light point.

In the final shading pass, done from the final camera position,  I need
a matrix for calculating
the actual positions depth from light point and compare it with the
shadow maps depth.

So I think I could do some comparable calculation in my prerender pass
and create a shadow map
manually without having the shadowmap prerender pass even when the
actual camera position
isn't at light position. This would be a very welcome speedup.

Maybe I'm misleaded. So please kindly comment.

Thank you



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Shadow Shenanigans (Implementing shad... AnyOldName3 General 9 Wed Sep 20, 2017 4:07 pm View latest post
No new posts scene object not receiving/casting sh... Meldryt General 0 Thu May 11, 2017 8:01 am View latest post
No new posts Shadows on "invisible" objects Trajce Nikolov NICK General 2 Tue Mar 28, 2017 7:09 am View latest post
No new posts osgEarth: How to produce correct shad... mikaxr27 General [3rdparty] 0 Mon Sep 19, 2016 7:30 pm View latest post
No new posts Trouble with NodeMask and shadows wernerM General 2 Mon Aug 22, 2016 9:55 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP