Page 1 of 2

Shaders

PostPosted: Nov 9, 2006 @ 9:49am
by PsychoChris
Hello,

the current shader implementation doesn't provide the coordinates of the pixel beeing processed. I thought about doing shader stuff manually by locking a surface and manipulating its pixels by hand.
Now i'm asking myself if this would have the same performance like using the given shader class or does it use some optimizations?

Greetings and thanks,
Chris

PostPosted: Nov 13, 2006 @ 8:54pm
by Kzinti

PostPosted: Nov 14, 2006 @ 5:35am
by PsychoChris

PostPosted: Nov 14, 2006 @ 8:12pm
by Kzinti

PostPosted: Nov 14, 2006 @ 9:56pm
by PsychoChris

PostPosted: Nov 15, 2006 @ 2:35am
by Kzinti

PostPosted: Nov 15, 2006 @ 6:02am
by PsychoChris
Thank you for your help. After digging deeper into the template stuff for pixel operations i finally managed to get pixel shader lights working.
I found some comments that you intended to change the template stuff and exchange it with new shader code. I'm curious: What exactly did you want to change?

Greetings,
Chris

PostPosted: Nov 16, 2006 @ 1:23am
by Kzinti

PostPosted: Nov 16, 2006 @ 11:04pm
by PsychoChris
I don't know if i should laugh or cry after reading that... ;-)

btw: I send you some days an email through this board but didn't get a reply. Is the email functionality working or perhaps your email here out of date?

Greetings,
Chris

PostPosted: Nov 16, 2006 @ 11:20pm
by Kzinti
I did get an email from you asking about this x,y thing in shaders. I also saw the post here and decided to answer here. This way everyone benefits from the conversation.

If your email was something else, then I am afraid I did miss it.

PostPosted: Nov 17, 2006 @ 2:47am
by PsychoChris

PostPosted: Nov 17, 2006 @ 11:06am
by jaguard

PostPosted: Nov 18, 2006 @ 3:28am
by PsychoChris
It still surprises me that the amount of parameters passed, especially if its just one object of the Point class, influences performance so much. I will try out passing only x and y in different variations to see how much performance changes i can see.

Next problems i'm facing with the light shader are the slow floats and a sqrt for calculating the distance between two points like sqrt(p1.x*p1.x + p2.x*p2.x). Any ideas how this could be improved? Perhaps somehow without the need of floatingpoint calculations.

btw jaguard: Can you give me an idea when your current game will be finished? I'm waiting for it. :-)

Greetings,
Chris

PostPosted: Nov 18, 2006 @ 11:38am
by jaguard

PostPosted: Nov 20, 2006 @ 11:36am
by Crayfish