Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 03:22:27 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)Bloom GLSL gaussian compile error
Pages: [1]
Print
Author Topic: Bloom GLSL gaussian compile error  (Read 1230 times)
khanser
Just dropped in

Offline Offline

Posts: 2


View Profile Email
« on: 03. October 2010, 06:46:23 pm »

Hi,

I'm really interested in bloom shader but when I tried the test at Xith-tk i had a GLSL compile error at gaussian_h and gaussian_v files.

I downloaded GLSL specification and the error don't show anymore so I think it's solved (still i can't get bloom effect running)

I leave the patch code here so anyone can upload it.
Code:
Index: gaussian_h.glslfrag
===================================================================
--- gaussian_h.glslfrag (revision 1832)
+++ gaussian_h.glslfrag (working copy)
@@ -1,7 +1,7 @@
 uniform sampler2D inTexture;
 
-vec2 pos[11] =
-{
+vec2 pos[11] = vec2[11]
+(
  vec2( -5, 0 ),
  vec2( -4, 0 ),
  vec2( -3, 0 ),
@@ -13,10 +13,10 @@
  vec2( +3, 0 ),
  vec2( +4, 0 ),
  vec2( +5, 0 )
-};
+);
 
-float samples[11] =
-{
+float samples[11] = float[11]
+(
     0.01222447,
     0.02783468,
     0.06559061,
@@ -28,7 +28,7 @@
     0.06559061,
     0.02783468,
     0.01222447
-};
+);
 
 void main()
 {
Index: gaussian_v.glslfrag
===================================================================
--- gaussian_v.glslfrag (revision 1832)
+++ gaussian_v.glslfrag (working copy)
@@ -1,7 +1,7 @@
 uniform sampler2D inTexture;
 
-vec2 pos[11] =
-{
+vec2 pos[11] = vec2[11]
+(
  vec2( 0, -5 ),
  vec2( 0, -4 ),
  vec2( 0, -3 ),
@@ -13,10 +13,10 @@
  vec2( 0, 3 ),
  vec2( 0, 4 ),
  vec2( 0, 5 )
-};
+);
 
-float samples[11] =
-{
+float samples[11] = float[11]
+(
     0.01222447,
     0.02783468,
     0.06559061,
@@ -28,7 +28,7 @@
     0.06559061,
     0.02783468,
     0.01222447
-};
+);
 
 void main()
 {

Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 03. October 2010, 08:12:04 pm »

I have applied your patches. Thanks a lot.

I don't see the bloom effect, too. But I have no time to deal with it.

Marvin
Logged
khanser
Just dropped in

Offline Offline

Posts: 2


View Profile Email
« Reply #2 on: 10. October 2010, 07:40:02 pm »

I have been messing with bloom effect and I discovered the bloom effect only works when the sphere collide with the starting eye viewing plane. If I deactivate the bloomFactory call I can see the world. Also I tried applying spotLight to that test but whatever I do that sphere won't get another light than default lighting.

Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic