Ambient occlusion shaders.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Ambient occlusion shaders.
I was wondering how you calculate the accesibility value that's passed into the shader to determine diffuse lighting with. How do you implement it in Irrlicht?
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
XEffects
If you're wondering why I don't use XEffects, it's because I'll probably learn more this way, and AO is going to be my first project with shaders(it seems to be pretty simple).
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
hopefully someone will reply your post
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
Why do it real time when you can bake it into textures or vertex colours(see blender)? Ambient occlusion is very simple, imagine the world is a sphere with your object contained inside it, light comes from the sphere and hits your object, its a standard dot product like a point light except there are point lights all around your object and there is no distance attenuation.
After you have your AO term, multiply it by your ambient term in the objects lighting shader, you can also multiply it with the diffuse and spec of dynamic lights for some fake self shadowing.
After you have your AO term, multiply it by your ambient term in the objects lighting shader, you can also multiply it with the diffuse and spec of dynamic lights for some fake self shadowing.
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
Re: Ambient occlusion shaders.
This doesn't sound like SSAO anyway.3DModelerMan wrote:I was wondering how you calculate the accesibility value that's passed into the shader to determine diffuse lighting with. How do you implement it in Irrlicht?
A quick google reveals you're trying to implement this technique: http://http.developer.nvidia.com/GPUGem ... ter14.html
"Accessibility" seems to refer to the inverse of the occlusion value. It's calculated in the shader and doesn't get passed anywhere (It's used in the final result though).
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Hmmm
Is there a tutorial on using nVidia melody to generate AO accesibility factors?
What I found the technique for AO in was the openGL shading language second edition book. It showed the general idea of calculating but not much else, just the shader.
What I found the technique for AO in was the openGL shading language second edition book. It showed the general idea of calculating but not much else, just the shader.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar