Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Using fullscreen shaders?

Author
Message
Fluorescent
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 1st Aug 2005
Location: Stockholm, Sweden
Posted: 19th Jun 2017 18:27
To use a fullscreen shader, I have to first create a quad object, an image, render my scene to the image, apply it to the quad, run the shader on the quad then draw the quad to screen. Is this the correct process for using fullscreen shaders? And if so, is there really a difference between LoadFullscreenShader and LoadSpriteShader? Don't both commands load a pixel-shader?
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 19th Jun 2017 19:44 Edited at: 19th Jun 2017 20:11
1. Correct... You render the scene to your image which is applied to your quad... and the quad is automatically rendered by sync if you don't hide it.
2. Everything has vertices and fragments ...
-even sprites, the only differences are that sprites live inside an orthographic projection and objects in a perspective projection space (with the additional dimension Z), but the quad in agk fits to to the screen perfectly without a projection.
-fragments are potential pixels... they get rendered if they don't get discarded because they are occluded by something in front of them.
3. Yes...everything needs Vertex and Pixel shaders(except of drawline and such) but agk generates vertex shader for us in the case of fullscreen and sprites.

You could create a sprite using a plain at a certain distance and an orthographic projection matrix.

Using AGKv2 Tier1

Login to post a reply

Server time is: 2024-11-24 15:05:07
Your offset time is: 2024-11-24 15:05:07