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 

pass uniforms to compute shader


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
Mary-Ann
Newbie


Joined: 19 Sep 2016
Posts: 8

PostPosted: Mon Oct 24, 2016 2:09 pm    Post subject:
pass uniforms to compute shader
Reply with quote

Hi everyone,

I am trying to write a functional compute shader, but the uniforms dont't want to work.
I have a compute and a usual shader program currently. The compute shader has to write a texture, which can be read by the usual shader. This part works fine. But I would like to pass some (custom) uniforms (lights, amount of the light sources, projection/view matrix etc.). I use the same method by the two shaders, , but the data seems to arrive only by the usual shader program.
I thought something could be wrong with the compute shader, but the texture data is there, so the communication is working. Should I pass the uniforms in an other way, when I have to send data to a compute shader? I can't figure it out, where is the mistake...

Thanks a lot Smile
Mary-Ann
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10983

PostPosted: Mon Oct 24, 2016 2:19 pm    Post subject:
pass uniforms to compute shader
Reply with quote

Hi Mary-Ann,

Could you please post this type of question to the General section of
the forum, the Submission section is just for code submission for
contributors to the OSG itself.

Thanks,
Robert.

On 24 October 2016 at 15:09, Mary-Ann Zorra <> wrote:
Quote:
Hi everyone,

I am trying to write a functional compute shader, but the uniforms dont't want to work.
I have a compute and a usual shader program currently. The compute shader has to write a texture, which can be read by the usual shader. This part works fine. But I would like to pass some (custom) uniforms (lights, amount of the light sources, projection/view matrix etc.). I use the same method by the two shaders, , but the data seems to arrive only by the usual shader program.
I thought something could be wrong with the compute shader, but the texture data is there, so the communication is working. Should I pass the uniforms in an other way, when I have to send data to a compute shader? I can't figure it out, where is the mistake...

Thanks a lot Smile
Mary-Ann

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69141#69141








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Mary-Ann
Newbie


Joined: 19 Sep 2016
Posts: 8

PostPosted: Mon Oct 24, 2016 2:22 pm    Post subject:
Reply with quote

Ah, sure, sorry :/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission 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 draw primitive sets and geometry shad... wernerM General 0 Wed May 24, 2017 3:20 pm View latest post
No new posts passing material properties to shader... gpantar General [forum] 3 Mon May 15, 2017 1:17 pm View latest post
No new posts Multi-pass rendering segfault issue qiaokun General 0 Mon May 15, 2017 10:36 am View latest post
No new posts Scale problem while transforming obje... YuraIU02 General 1 Sat Apr 15, 2017 4:26 pm View latest post
No new posts shader 崔 献军 General 1 Fri Apr 07, 2017 1: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