viewport shader ???

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
ap369
Posts: 6
Joined: Sat Jan 28, 2012 12:18 am
Location: Tunisia

viewport shader ???

Post by ap369 »

hi , how can i apply a shader to the viewport ?? help plz :(
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: viewport shader ???

Post by hybrid »

A shader is always applied to something being rendered. If you set a viewport and render something, the shader will be applied to everything rendered with that material inside the viewport. Maybe rephrase your question so we know what you really mean.
ap369
Posts: 6
Joined: Sat Jan 28, 2012 12:18 am
Location: Tunisia

Re: viewport shader ???

Post by ap369 »

what i mean is , i want apply the shader to all pixels on the viewport , example :
http://wpfwonderland.files.wordpress.co ... image1.png
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: viewport shader ???

Post by hybrid »

I'm still puzzeled what you mean, but maybe screen quad helps you. If you want to render a shader e.g. as a post-processing technique, you take the whole image as a texture (render to texture). Then you render a new full screen quad with your shader technique and the RTT applied as material. This leads to another full-screen render, but this time with your shader applied to the original scene. Is that what you want to achieve?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: viewport shader ???

Post by greenya »

Maybe it is a post processing effect?
ap369
Posts: 6
Joined: Sat Jan 28, 2012 12:18 am
Location: Tunisia

Re: viewport shader ???

Post by ap369 »

hi
that's what i mean , in effect composer part
http://www.youtube.com/watch?v=woHZRUlOQqo
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: viewport shader ???

Post by hybrid »

If you want to learn about shaders, maybe read examples 10 and 11 first. The application of the shaders you see in the video happens on different ways. First one is a simple shader material, next ones are all post-processing, then come more material shaders, etc.
ap369
Posts: 6
Joined: Sat Jan 28, 2012 12:18 am
Location: Tunisia

Re: viewport shader ???

Post by ap369 »

thx hybrid ;)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: viewport shader ???

Post by hybrid »

Oh, btw, we don't have a fixed post-processing scheme integrated into the engine so far. So for this you need to use one of the post-processing examples from the forum. You should find at least a hand full of those which are still actively developed and used in the code snippets or project forum.
Post Reply