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 

RTT + shaders example

Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9
Quote:
"uniform mat4 MV;n"
00
Quote:
"uniform mat4 MV;n"
01
Quote:
"uniform mat4 MV;n"
02
Quote:
"uniform mat4 MV;n"
03
Quote:
"uniform mat4 MV;n"
04
Quote:
"uniform mat4 MV;n"
05
Quote:
"uniform mat4 MV;n"
06
Quote:
"uniform mat4 MV;n"
07
Quote:
"uniform mat4 MV;n"
08
Quote:
"uniform mat4 MV;n"
09
Quote:
"uniform mat4 MV;n"
10
Quote:
"uniform mat4 MV;n"
11
Quote:
"uniform mat4 MV;n"
12

------------------
Post generated by Mail2Forum
Back to top
Michael Maurus
Guest





PostPosted: Wed Jul 12, 2017 11:28 am    Post subject:
RTT + shaders example
Reply with quote

Hi all,

I am trying to figure out RTT in combination with shaders for implementing a gbuffer but I can't get the different examples to work together.
This is a working example for using my shaders, but without RTT and also for setting the StateSet for the model and not the camera.

const char* vertSource =
Quote:
"#version 400n"
Quote:
"uniform mat4 MV;n"
Quote:
"uniform mat4 N;n"
Quote:
"uniform mat4 P;n"
Quote:
"layout(location = 0) in vec4 Vertex;n"
Quote:
"layout(location = 1) in vec3 Normal;n"
Quote:
"smooth out vec3 p;n"
Quote:
"smooth out vec3 n;n"
Quote:
"void main(void) {n"
Quote:
"uniform mat4 MV;n"
0
Quote:
"uniform mat4 MV;n"
1
Quote:
"uniform mat4 MV;n"
2
Quote:
"uniform mat4 MV;n"
3
Quote:
"uniform mat4 MV;n"
4
Quote:
"uniform mat4 MV;n"
5
Quote:
"uniform mat4 MV;n"
6
Quote:
"uniform mat4 MV;n"
7
Quote:
"uniform mat4 MV;n"
8
Quote:
"uniform mat4 MV;n"
9
Quote:
"uniform mat4 N;n"
0
Quote:
"uniform mat4 N;n"
1
Quote:
"uniform mat4 N;n"
2
Quote:
"uniform mat4 N;n"
3
Quote:
"uniform mat4 N;n"
4
Quote:
"uniform mat4 N;n"
5
Quote:
"uniform mat4 N;n"
6
Quote:
"uniform mat4 N;n"
7
Quote:
"uniform mat4 N;n"
8
Quote:
"uniform mat4 N;n"
9
Quote:
"uniform mat4 P;n"
0
Quote:
"uniform mat4 P;n"
1
Quote:
"uniform mat4 P;n"
2
Quote:
"uniform mat4 P;n"
3
Quote:
"uniform mat4 P;n"
4
Quote:
"uniform mat4 P;n"
5
Quote:
"uniform mat4 P;n"
6
Quote:
"uniform mat4 P;n"
7
Quote:
"uniform mat4 P;n"
8
Quote:
"uniform mat4 P;n"
9
Quote:
"layout(location = 0) in vec4 Vertex;n"
0
Quote:
"layout(location = 0) in vec4 Vertex;n"
1
Quote:
"layout(location = 0) in vec4 Vertex;n"
2
Quote:
"layout(location = 0) in vec4 Vertex;n"
3
Quote:
"layout(location = 0) in vec4 Vertex;n"
4
Quote:
"layout(location = 0) in vec4 Vertex;n"
5
Quote:
"layout(location = 0) in vec4 Vertex;n"
6
Quote:
"layout(location = 0) in vec4 Vertex;n"
7
Quote:
"layout(location = 0) in vec4 Vertex;n"
8
Quote:
"layout(location = 0) in vec4 Vertex;n"
9
Quote:
"layout(location = 1) in vec3 Normal;n"
0
Quote:
"layout(location = 1) in vec3 Normal;n"
1
Quote:
"layout(location = 1) in vec3 Normal;n"
2
Quote:
"layout(location = 1) in vec3 Normal;n"
3
Quote:
"layout(location = 1) in vec3 Normal;n"
4
Quote:
"layout(location = 1) in vec3 Normal;n"
5
Quote:
"layout(location = 1) in vec3 Normal;n"
6
Quote:
"layout(location = 1) in vec3 Normal;n"
7
Quote:
"layout(location = 1) in vec3 Normal;n"
8
Quote:
"layout(location = 1) in vec3 Normal;n"
9 0 1 2 3 4 5 6 7 8 9
Quote:
"smooth out vec3 p;n"
0
Quote:
"smooth out vec3 p;n"
1
Quote:
"smooth out vec3 p;n"
2
Quote:
"smooth out vec3 p;n"
3
int main(int, char**) {
Quote:
"smooth out vec3 p;n"
4
Quote:
"smooth out vec3 p;n"
5
Quote:
"smooth out vec3 p;n"
6
Quote:
"smooth out vec3 p;n"
7
Quote:
"smooth out vec3 p;n"
8
Quote:
"smooth out vec3 p;n"
9
Quote:
"smooth out vec3 n;n"
0
Quote:
"smooth out vec3 n;n"
1
Quote:
"smooth out vec3 n;n"
2
Quote:
"smooth out vec3 n;n"
3
Quote:
"smooth out vec3 n;n"
4
Quote:
"smooth out vec3 n;n"
5
Quote:
"smooth out vec3 n;n"
6
Quote:
"smooth out vec3 n;n"
7
Quote:
"smooth out vec3 n;n"
8
Quote:
"smooth out vec3 n;n"
9
Quote:
"void main(void) {n"
0
Quote:
"void main(void) {n"
1
Quote:
"void main(void) {n"
2
Quote:
"void main(void) {n"
3
Quote:
"void main(void) {n"
4
Quote:
"void main(void) {n"
5
Quote:
"void main(void) {n"
6
Quote:
"void main(void) {n"
7
Quote:
"void main(void) {n"
8
Quote:
"void main(void) {n"
9