CGB01
Half-Nub
Cakes 2
Posts: 63
|
|
« Reply #50 on: May 26, 2013, 05:04:55 AM » |
|
Tried your new version and still getting the errors. This is proving to be a hard one to fix Sorry about that Hitch. Here's the errors I'm getting; glsl programs: enabled Initializing Programs Error: ERROR: 0:28: '[' : array must be redeclared with a size before being indexed with a variable WARNING: 0:52: 'assign' : implict conversion between types allowed from GLSL 1.20 WARNING: 0:56: 'texture' : function not available in current GLSL version WARNING: 0:58: 'assign' : implict conversion between types allowed from GLSL 1.20 WARNING: 0:58: 'texture' : function not available in current GLSL version WARNING: 0:63: 'clamp' : implicit conversion is allowed from GLSL 1.20 WARNING: 0:63: 'assign' : implict conversion between types allowed from GLSL 1.20 WARNING: 0:67: 'texture' : function not available in current GLSL version WARNING: 0:67: 'texture' : function not available in current GLSL version WARNING: 0:67: 'assign' : implict conversion between types allowed from GLSL 1.20 WARNING: 0:69: 'assing' : implict conversion between types allowed from GLSL 1.20
Couldn't compile fragment shader for program postprocess
|
|
|
Logged
|
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #51 on: May 26, 2013, 05:35:20 AM » |
|
Thanks for testing CGB01, it seems the problem is the postprocessing programs? which one do you use?
|
|
|
Logged
|
|
|
|
CGB01
Half-Nub
Cakes 2
Posts: 63
|
|
« Reply #52 on: May 26, 2013, 05:37:12 AM » |
|
I did \r_postprocess water\stream and placed your source code files in \glsl\water directory. Is this not correct?
|
|
|
Logged
|
|
|
|
Gig
In the year 3000
Cakes 45
Posts: 4394
|
|
« Reply #53 on: May 26, 2013, 12:08:07 PM » |
|
Hitch, it would be better if you could attach pk3 to use out-of-the-box. One needs to modify the .shader files you posted, in order to make it work. I'm extremely in hurry, but I can tell you that I tested the "old" version of the stream shader (the one from my previous screenshots in this page) with an older ATI Radeon card (X1600, dated around 2005-2006 I think), and GLSL encountered errors.Then I tried your version 1.1b. To do that, I extracted all the content of my glsl_test_long.pk3 (to have the correct subfolders and gig/waternormal.jpg), and then deleted the pk3. Then I took the files inside your glsl_stream_v1_1b.zip and placed them into the appropriate folders (/glsl/water and /scripts) overwriting the previous files. Then I had to modify the shader file, to point to the right files folders (/textures/gig) and to keep only one of the two shaders there. textures/liquids/clear_ripple2 { qer_editorimage textures/liquids/pool3d_3.jpg surfaceparm trans surfaceparm nonsolid surfaceparm water cull disable deformVertexes wave 64 sin .25 .25 0 .5
{ map textures/liquids/pool3d_5.jpg blendFunc gl_dst_color gl_one rgbgen identity tcmod scroll -.025 .001 //GLSL map2 textures/gig/pebbles1.jpg //GLSL map3 textures/gig/waternormal.jpg //GLSL program stream //GLSL vertexProgram glsl\water\stream_vp.glsl //GLSL fragmentProgram glsl\water\stream_fp.glsl }
{ map textures/liquids/pool3d_6.jpg blendFunc gl_dst_color gl_one rgbgen identity tcmod scroll .03 -.001 } { map textures/liquids/pool3d_5e.jpg blendFunc gl_dst_color gl_one rgbgen identity tcmod scroll .001 .025 } { map $lightmap blendFunc gl_dst_color gl_zero rgbgen identity }
}
The result (tested with sv_pure 0) does not give errors, and the "standard" shader version is not black and white. However, the GLSL effect is way TOO transparent, it's almost unnoticeable! See you tomorrow, I have to RUN now! Bye!
|
|
|
Logged
|
I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #54 on: May 26, 2013, 03:06:03 PM » |
|
the stream glsl program goes into the map shaders like the one Gig shows. There are only a few glsl postprocessing programs in OA at the moment -> Brightness, BWfilter, edges and EGAfilter
the postprocessing programs can be loaded from within the game using the /r_postprocess command
if a glsl program is used in map then they need to be specified in script files and within a specific shader that is used in a map.
I'll try to get a map for learning use of glsl ready (wanted to do a full version map using glsl but that will likely take a long time).. should be ready within few days.
@Gig, I'll try to modify it further - add diffuse and a bit more specular components.
|
|
|
Logged
|
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #55 on: May 26, 2013, 03:11:08 PM » |
|
@CGB01, the error message possibly relates to glsl program trying to use textures that a map shader would specify but which postprocessing does not.. just a long shot guess I'll make a simple map that makes use of some glsl programs - possibly better to wait until this is done before testing again. Thanks to you both Gig and CGB01 for taking time to beta test! Cheers
|
|
|
Logged
|
|
|
|
Gig
In the year 3000
Cakes 45
Posts: 4394
|
|
« Reply #56 on: May 27, 2013, 05:42:06 AM » |
|
Okay, I've done some more tests (this time with the Radeon HD 5670, the recent card). After fixing the shader file (file paths you post are still different than mine, e.g. I have to write "textures/gig/waternormal.jpg" in the place of of "glshader/3605-normal.jpg".... and I have to delete all the "second" -short- shader from the file... I don't know why you place it there.). Both glsl_stream_v1_1.zip and glsl_stream_v1_1b.zip versions technically work with this video card, and they look like the same thing. But, unlike the previous version, they are no longer "awesome", because -as I told you yesterday... sorry for repeating, but I mention it again for completeness of this post- now the "pebbles" layer is really too much transparent, and almost unnoticeable (see the first screenshot attached here). I liked the previous version more. The good thing of them is that now the "standard" version of the shader does not show a black and white oddity anymore, but shows the classic shader. Other bad things of them include still having the problem of "doubled" marks on walls (an extra "burn" mark appears on water surface), and having the "standard" version of the shader that does not flow like Akom's shader (or like the glsl version if you prefer), while it should. Other test I've done is to try your water_pool.zip. I extracted the glsl files to /glsl/water folder, then the hydrowater.shader to the /scripts folder, and then modified it in a way to have it "create" /textures/liquids/clear_ripple3 (the other kind of water used in my map, that does not use hydrowater shader!), and to use textures/gig/waternormal.jpg instead of glshader/3605-normal.jpg. I launched the map and, as you can see in the second screenshot, it does show it like "standard" hydrowater (which is not exactly adapt for the use in my cistern, because it has got too huge waves), just a little darker. It does not seem to give compiling errors, but it does not look like in your screenshot. I have no ideas about the reason.... PS: there is still also the problem with the sparks not working... It looks like these GLSL shaders are a more wild beast than expected... PPS: I hope my comments do not seem "harsh" in any way. I mean, I really appreciate your efforts, I'm just providing feedback, and at the moment there are some problems...
|
|
« Last Edit: May 27, 2013, 06:01:24 AM by Gig »
|
Logged
|
I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #57 on: May 28, 2013, 08:20:03 AM » |
|
hey Gig! The problem with ripple water and pebbles not showing is the q3 shader blendfunc's doing. Changing the blendfunc will show the pebbles. I guess an easy way out of this is putting to use the patch that loads different shader files depending on the renderer used or if we add a check to the engine for glsl enabled cvar (so if glsl is enabled the shader files would be loaded from a separate folder - which would also remove need for the //GLSL keyword and possibly make the folder structure easier to maintain). I dont see how the blendfunc could be changed from within the glsl program and am sorry about this. As for pool water.. i am not sure.. possibly the glsl program failed compilation? And dont worry about the comments being harsh.. they are not and if we are to have any use of glsl in OA then I guess this is the road we have to walk.. I'm actually trying to get my map from Blender to OA... not an easy task but no matter.. few dozen tutorials later and I'm still at point zero..but looking forward. If I even manage to do this then I guess the glsl demo map will be an easier way to get this up and running.
|
|
|
Logged
|
|
|
|
Gig
In the year 3000
Cakes 45
Posts: 4394
|
|
« Reply #58 on: May 28, 2013, 08:43:13 AM » |
|
I don't get... what's the reason you are trying to make a map in blender? I've heard this is actually possible (maybe you can try to take a look to this page: ( DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Modelling_a_map)... however I don't get the reason to get into a such (relatively?) difficult thing. Why don't you just create the simple map with NetRadiant, GTKRadiant or even Q3Radiant (the last one probably is easier to use, but correctly configuring it with OA is a pain... e.g. I've got some problems due to too many shader folders in OA...)? PS: If I understand the problem, it's that the current way GLSL shaders work is "flawed" in the sense that you may require to specify different "blendfunc" options (that are part of Q3 shaders, not GLSL specific) for the GLSL version and for the normal version, but at the moment there is no way to tell the engine that a specific line of the shader has to be ignored when using the standard version of the shader (or vice versa). Correct? Maybe when finding //GLSL the program should have not simply ignored the //GLSL, but should have actually applied the line only if GLSL support was enabled (and only if all glsl programs invoked by that shader do not encounter compiling errors). But a such change would require a new OA version (and may also break compatibilty -or simply change the final result- with shaders designed with the current system... not that at the moment there are many around, but...)... d'oh!
|
|
« Last Edit: May 28, 2013, 11:03:32 AM by Gig »
|
Logged
|
I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #59 on: May 28, 2013, 12:46:03 PM » |
|
yeah, the //GLSL keyword is processed at the moment regardless of the r_ext_vertex_shaders command being 0 or 1.. it's a bug easily fixed but does require at least a patch of the game executable. The other way is to create shaders that can work around this. I've just spent few hours trying to get Gmax and Tempest to make a map but it seems this combination has a mind of its own and while seems OK for quick draft of a map, the moment one tries to do something more interesting things start to break apart. I'll try the Q3radiant next as I've had not much luck with Blender exporters either. The reason for a separate map is that I understood you would not like your map to be used as a demo map. But no worries, I'll get to making a simple one! I gotta , not because its easy but because it's hard :p
|
|
|
Logged
|
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #60 on: May 28, 2013, 02:21:32 PM » |
|
forgot to send this one: textures/liquids/clear_ripple3 { qer_editorimage textures/liquids/pool3d_3c.tga qer_trans .5 q3map_globaltexture surfaceparm trans surfaceparm nonsolid surfaceparm water cull disable deformVertexes wave 64 sin .5 .5 0 .5 { map textures/liquids/pool3d_5.jpg blendFunc GL_one GL_one tcmod scale 1 1 tcmod transform 0 1.5 1 1.5 2 1 tcmod scroll .025 -.001 //GLSL map3 glshader/3605-normal.jpg //GLSL program water //GLSL vertexProgram glsl\water\water_vp.glsl //GLSL fragmentProgram glsl\water\water_fp.glsl
}
{ map textures/liquids/pool3d_5.jpg blendFunc GL_dst_color GL_one rgbgen identity tcmod scale .5 .5 tcmod transform 1.5 0 1.5 1 1 2 tcmod scroll -.05 .001
}
{ map textures/liquids/pool3d_5.jpg blendFunc GL_dst_color GL_one rgbgen identity tcmod scale .5 .5 tcmod transform 0 1.5 1 1.5 2 1 tcmod scroll .025 -.001 } { map $lightmap blendFunc GL_dst_color GL_zero rgbgen identity } }
this is clear_water ripple3 I have.. hope it works for you - if it does not then probably glsl program didn't compile right?
|
|
|
Logged
|
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #61 on: May 28, 2013, 02:39:21 PM » |
|
And a plasma effect. glsl program, screenshot and shader included. Please test when you get a moment ( not necessarily Gig! ) Cheers
|
|
|
Logged
|
|
|
|
Gig
In the year 3000
Cakes 45
Posts: 4394
|
|
« Reply #62 on: May 29, 2013, 07:50:02 AM » |
|
So, I removed the "clear_ripple3" replacement shader file (that I did from your previous "hydrowater" file), and created a new .shader file, copy-pasting your code from this post, and making one only change: from //GLSL map3 glshader/3605-normal.jpg to //GLSL map3 textures/gig/waternormal.jpg . The result is as shown in these screenshots, with r_ext_vertex_shader 0 and 1, respectively. No GLSL-related warning seems to be shown in console. Maybe some other blendfunc-related problem? UPDATE: with "developer 1", I can see it loads glsl/water/water_fp.glsl and water.vp.glsl... but it does not mention "clear_ripple3"...
|
|
« Last Edit: May 29, 2013, 08:22:27 AM by Gig »
|
Logged
|
I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
|
|
|
Gig
In the year 3000
Cakes 45
Posts: 4394
|
|
« Reply #63 on: May 29, 2013, 08:11:11 AM » |
|
And a plasma effect. glsl program, screenshot and shader included. Please test when you get a moment ( not necessarily Gig! ) Cheers Considering the shader file "creates" textures/liquids/plasma_glsl and my map does not search for that file, I copied the shader code to make the shader file "create" also textures/liquids/clear_ripple2 and textures/liquids/clear_ripple3. ... and I got this: Error: Fragment shader failed to compile with the following errors: ERROR: 0:10: error(#162) Wrong operand types no operation '*' exists that takes a left-hand operand of type '4-component vector of float' and a right operand of type 'highp 2-component vector of float' (or there is no acceptable conversion) ERROR: 0:10: error(#162) Wrong operand types no operation '-' exists that takes a left-hand operand of type '4-component vector of float' and a right operand of type '2-component vector of float' (or there is no acceptable conversion) ERROR: 0:10: error(#160) Cannot convert from '4-component vector of float' to 'highp 2-component vector of float' ERROR: 0:18: error(#162) Wrong operand types no operation '+' exists that takes a left-hand operand of type 'const highp 2-component vector of float' and a right operand of type '4-component vector of float' (or there is no acceptable conversion) ERROR: error(#273) 4 compilation errors. No code generated
Couldn't compile fragment shader for program plasma4WARNING: RE_GLSL_RegisterProgram failed for 'program plasma4' in shader 'textures/liquids/clear_ripple2' WARNING: RE_GLSL_RegisterProgram failed for 'program plasma4' in shader 'textures/liquids/clear_ripple3' WARNING: RE_GLSL_RegisterProgram failed for 'program plasma4' in shader 'textures/liquids/clear_ripple3'
Water appears "still" (just inflating and deflating a little) and greyscale. I also noticed that simply calling the shader file zplasma.shader made nothing happen (I saw the water like in the previous tests)... quite strange: I appositely called the file zplasma.shader instead of plasma.shader thinking about game's resources loading order... but... I thought that (due to alphabetical order of file loading) a shader contained in a file a "zplasma.shader" would override a shader with the same name contained in a file called "clear_ripple3.shader" or "stream.shader", but it has been ignored instead. I had to remove my "clear_ripple3.shader" and "stream.shader" files from the "scripts folder" to have the game trying to use the effects in zplasma.shader (this way, the game tried to applied it and showed the errors I reported above). Taking a look with "developer1", it seems that the game loads the .shader files that are in my "scripts" folder in the OPPOSITE ALPHABETICAL ORDER than those it loads previously (from pk3 files). Example: [...] ...loading 'scripts/oapowerups.shader' ...loading 'scripts/oasfx.shader' ...loading 'scripts/oasky.shader' ...loading 'scripts/oquartz.shader' ...loading 'scripts/pulchr.shader' ...loading 'scripts/q3map2_void3.shader' ...loading 'scripts/q3map2_void4.shader' ...loading 'scripts/qtex.shader' ...loading 'scripts/suction.shader' ...loading 'scripts/temporary.shader' ...loading 'scripts/terrain.shader' ...loading 'scripts/trak2.shader' ...loading 'scripts/zz_clear_ripple3.shader' ...loading 'scripts/gig_shaders02.shader' ...loading 'scripts/gig_shaders01.shader'
What a strange thing... P.S.: Hitch, you can use "screenshotjpeg" command (obviosly binded to a key) instead of "screenshot" to capture in-game screens in jpg instead of tga... smaller files.
|
|
« Last Edit: May 29, 2013, 11:05:43 AM by Gig »
|
Logged
|
I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #64 on: May 30, 2013, 05:13:58 AM » |
|
Thanks for testing Gig! And thanks for the hint about the screenshots - I was wondering how to insert a screenshot that actually shows is a thread as graphics preview. As for plasma errors, the corrected version here attached - I hope, but according to the errors you received this one should work.
|
|
|
Logged
|
|
|
|
Gig
In the year 3000
Cakes 45
Posts: 4394
|
|
« Reply #65 on: May 30, 2013, 07:14:54 AM » |
|
Hi, the new plasma effect works. Very nice! (See first screenshot) I was wondering if that could be used for the GLSL version of my sparks... Lately I've added sparks around a few gametype-oriented things such as flags. This time, not as small "bars" but as a small circle (see second screenshot). Using your plasma glsl effect for that gives the interesting result you see in the third screenshot. In the fourth screenshot, instead, you can see that also in the place of the old sparks it shows its nice glsl colors... but maybe in that case the shape of the sparks polygons is too noticeably. What do you think? However, when I turn off GLSL, it looks a little like water (my simple stripes animation is not in this shader)... Do you think you may make a single shader with actually your GLSL plasma for the GLSL part and my gig_stripes1 for the standard part? UPDATE: I've just noticed a very strange thing... any suggestion about the possible reason is welcome. It's about the problem of the doubled "marks on walls"... it's not due to Hitch' shaders... I can notice them, in my map, even in Quake3, with the original clear_ripple2 and clear_ripple3. How to explain that?
|
|
« Last Edit: May 30, 2013, 08:16:23 AM by Gig »
|
Logged
|
I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #66 on: May 31, 2013, 06:46:36 AM » |
|
I've modified the plasma glsl program to generate the alpha value on the fly.. Also, I've added some more math so that the pixels are more visible depending on where on the Z axis the pixel is. It is here attached if you want to try it with your stripes shader. Also included is a small shader file. As for the glsl off version of the shader looking like water .. it is corrected in this version of the 'pak' file.. as each shader pass needs an image for OA to consider using it, I've used in the past an image from the water shader - now a plasma jpg is added. As for your version of stripes shader - basically just use the version you have (that is not glsl enabled) and add in the first shader stage the following lines:
//GLSL program plasma2 //GLSL vertexProgram glsl\plasmas\plasma2\plasma_vp.glsl //GLSL fragmentProgram glsl\plasmas\plasma2\plasma_fp.glsl
And to make the glsl effect less visible, one could modify the glsl fragment program to include a line like this: if (alpha>0.5) { alpha=0.5; } // this would cutoff all the color where alpha is larger than 0.5 OR a line like this: alpha=alpha/2; // this would half the value of alpha
but I guess this is more something for the tutorial.. :|
[edit] removed the pak file
|
|
« Last Edit: May 31, 2013, 07:31:29 AM by Hitchhiker »
|
Logged
|
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #67 on: May 31, 2013, 07:34:32 AM » |
|
Here is another effect glsl can do easily. Here called texmix, and what it does is mix two textures using the red color component from the mask texture.
Pak file here attached.
|
|
|
Logged
|
|
|
|
fromhell
|
|
« Reply #68 on: May 31, 2013, 07:36:50 PM » |
|
Ok that's an interesting one because it works around the trouble of vertex painting terrain. I believe this is what Halo did on the PC
|
|
|
Logged
|
asking when OA3 will be done won't get OA3 done. Progress of OA3 currently occurs behind closed doors alone I do not provide technical support either.new code development on github
|
|
|
Gig
In the year 3000
Cakes 45
Posts: 4394
|
|
« Reply #69 on: June 01, 2013, 05:01:25 AM » |
|
Sounds interesting. I hope to have some time to try it on monday...
|
|
|
Logged
|
I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #70 on: June 01, 2013, 09:22:33 AM » |
|
I've added few variants of the texmix program. as texmix in its generic form uses scaling of texture coordinates, sometimes it will not tile well. to remedy this I've added a version for horizontal surfaces (or slopes for that matter but slopes might show stretching of the textures) and a 3d version of the texmix program (this one will almost certainly stretch texture in a strange way on some maps - to be used with this in mind). Added also a fake aluminum texture - procedural texture that is sort of good for hangars? Also added bands program - that draws bands using geometry position. and a texmix version of bands program - texbands. screenshots: 1-bands 2-textured bands 3-texmix variant 4-fake aluminum (in the next post)
|
|
|
Logged
|
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #71 on: June 01, 2013, 09:23:35 AM » |
|
aluminum screenshot
|
|
|
Logged
|
|
|
|
GrosBedo
Member
Cakes 20
Posts: 710
|
|
« Reply #72 on: June 01, 2013, 11:03:43 AM » |
|
Just as a side-note, I've met a few demosceners at a conference and they gave me two interesting links that I thought I'd share here: - Shadertoy.com : an online repository for shaders where you can execute them in-browser using JavaScript and you can also directly edit and try your own code. - I.Q.'s website : where you can find tutorials, explanations and maths calculus for a lot of the shaders posted on Shadertoy. Can be interesting resources for training.
|
|
|
Logged
|
|
|
|
Hitchhiker
Member
Cakes 11
Posts: 181
|
|
« Reply #73 on: June 03, 2013, 05:34:56 AM » |
|
Really a nice find GrosBedo, Thanks!
@all, I've realized few days ago that OA, even though it uses normals in computations and can draw them on the screen, never actually sends those to the OpenGL. This is simple to fix but will have to be done in the next release. So, FYI and to save you possibly hours or trying and failing, if anybody tries working with glsl in OA and your glsl programs depend on the normals keep that in mind. And possibly (I'm not sure) this is true only for the map geometry and entities will have their geometry's normals available in glsl. Bump mapping and parallax mapping can still be done but for simplicity they can only be made to work correctly on i.e. floors as the normal can be provided directly in the glsl program. So this is probably the next glsl program I'm posting.
|
|
|
Logged
|
|
|
|
Gig
In the year 3000
Cakes 45
Posts: 4394
|
|
« Reply #74 on: June 03, 2013, 06:50:12 AM » |
|
//GLSL program plasma2 //GLSL vertexProgram glsl\plasmas\plasma2\plasma_vp.glsl //GLSL fragmentProgram glsl\plasmas\plasma2\plasma_fp.glsl
Tried (I had to change something in the path)... still nice... very similar to the previous one, isn't it? And to make the glsl effect less visible, one could modify the glsl fragment program to include a line like this: if (alpha>0.5) { alpha=0.5; } // this would cutoff all the color where alpha is larger than 0.5 OR a line like this: alpha=alpha/2; // this would half the value of alpha but I guess this is more something for the tutorial.. :|
Simply adding a such line before the final "color+=" is not enough (the variable "alpha" is not initialized). I've not further tested this. However, for the moment it looks like your plasma, applied to my stripes shader, is the only effect (that I have been able to actually have working) that I think I can actually use in my map, because both standard version and GLSL versions of the shader look good. However, only in the "circular" brush ( around the white flag in my previous screenshot)... in its current state, it's not so adapt for the current way I created the stripes brushes above the jump-pad. Of course I may divide into gig_stripes1 (standard only) and gig_stripes2 (standard+glsl), for example. Would the energy around gametype-related items (flags, skull generator, obelisks) be enough? Maybe I could place the circular energy field also over jump-pads, instead of the current "stripes" brushes... but I spent some work on them and I don't enjoy the idea of removing all of them (maybe I could keep them over the accelerator pads only?). However, considering that changes to the way GLSL currently works will be required for the next OA release (inability to use different blendfunc options for glsl and standard versions, etc.), I don't know if releasing maps which follow the current implementation is a good idea or not. My fear is that the GLSL version map may become "broken" when the next OA version will be released. What do you think? Do you already have a precise idea of how GLSL behavior will change in the next OA release? I've added few variants of the texmix program. ...
I've not been able to have them work. As usual, I had to fix some file paths (e.g. it didn't find mask.jpg, so I had to make the shader look for your mix_mask.jpg instead)... but then I still encountered some compiling errors. Error: Vertex shader failed to compile with the following errors: ERROR: 0:37: error(#160) Cannot convert from 'attribute 4-component vector of float' to '2-component vector of float' ERROR: error(#273) 1 compilation errors. No code generated
Couldn't compile vertex shader for program bands2WARNING: RE_GLSL_RegisterProgram failed for 'program bands2' in shader 'textures/organics/dirt' WARNING: RE_GLSL_RegisterProgram failed for 'program bands2' in shader 'textures/organics/dirt'
Error: Fragment shader failed to compile with the following errors: ERROR: 0:28: error(#202) No matching overloaded function found mix ERROR: 0:28: error(#174) Not enough data provided for construction constructor ERROR: error(#273) 2 compilation errors. No code generated
Couldn't compile fragment shader for program texmixWARNING: RE_GLSL_RegisterProgram failed for 'program texmix' in shader 'textures/organics/dirt' WARNING: RE_GLSL_RegisterProgram failed for 'program texmix' in shader 'textures/organics/dirt'
However, in your screenshots they look quite interesting...
|
|
« Last Edit: June 03, 2013, 06:59:53 AM by Gig »
|
Logged
|
I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
|
|
|
|