Pages: [1] 2 3 ... 8
  Print  
Author Topic: GLSL  (Read 115731 times)
Hitchhiker
Member


Cakes 11
Posts: 180


« on: May 05, 2013, 02:47:11 pm »

Hi y'all,

as per Gig's suggestion I've made a short glsl tutorial. Here attached. Just a draft for the moment but should get you started..

Please let me know your comments, things to add to the tutorial, corrections, etc...

Eventually, if you have a piece of glsl code to share why not post it here?

Cheers,
Hitchhiker
« Last Edit: May 05, 2013, 02:53:20 pm by Hitchhiker » Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #1 on: May 06, 2013, 01:54:04 am »

Interesting reading. Nice work!  Smiley What about moving that to a page on the wiki? E.g. http://openarena.wikia.com/wiki/Main_Page/wiki/GLSL
If you need any help for that, I'm available. If you wish, I could try the first "conversion" from OpenOffice to MediaWiki...

Quote
This is done using the '/r_postporcess' command.
"r_postprocess", of course.  Smiley

Quote
A new cvar has been added to enable/disable the GLSL rendering path (default: disabled)
I would specify "In OpenArena 0.8.alien a new cvar has been added...."

Quote
Getting a bit more techinical
"Technical", of course... Smiley

Quote
if vertex shaders are disabled/unsupported
"if" --> "If"  Smiley

Quote
Newer builds will skip-over the //GLSL' keyword and process the shader line as if the //GLSL keyword was not there.
Maybe you may add something like ", hence executing the command." at the end. A ' is missing (or one should be removed) next to the first //GLSL.

Quote
Note: If you intend to use your shaders only on new version of OA the '//GLSL' keyword is not needed.
I would add something like "However, it's advisable to always use it, to prevent problems in case someone would play the game with old binaries, and to easily distinguish "standard" shader commands from GLSL-related commands in shader sources."

Quote
vertex shader is concerned with modifying...
vertex --> Vertex.

Quote
Vertex program (a simple example – save sa zmix_vp.glsl
"Save sa"? I suppose "save as"...

Quote
In example we will modify the shader in detailtest.shader file of the pak6-patch088.pk3.
Modifying stock pk3 files in any way is usually a bad idea (would cause problems when connecting to servers, e.g. forcing to re-download the package). I suppose you may suggest to make a copy of detailtest.shader and place it (under the correct sub-folder), in a z_glslstest.pk3 file.
Also, if it is possible to do these tests without the need to package it into a pk3 file (would the modified shader work out-from-pk3 if using sv_pure 0? Or the original one in the pk3 would "win" anyway?), you may mention it.

Quote
You should see something like this: (SCREENSHOT)
What about placing also a normal screenshot of the same scene, but without GLSL active, to compare the differences?

OTHER THINGS:
- I imagine also the "skip" program "works" only when r_ext_vertex_shader is 1, right? I suppose this could be expressly said.

- You could place example screenshots of GLSL postprocess effects. If you want, one already exists:
http://openarena.wikia.com/wiki/File:R_postprocess_edges.jpg (a screenshot with the "edges" GLSL program active)
http://openarena.wikia.com/wiki/File:Islanddm.jpg (a screenshot of the same map, but without GLSL)

- Is there a way to distinguish a GLSL program adapt to be used in a shader from one adapt to be used for postprocessing?

- When you will have some time, can you write down a list of the GLSL programs included in OA 0.8.8 package, explaining what they do?

- I suppose one should say that the artist MUST test the shader in-game with both GLSL support enabled and disabled: the shader has to display something "reasonable" for all users.

- Do all video cards supporting GLSL give the same results, or could some GSLS programs do not work, or give different results, with different hardware (e.g. using NVIDIA or AMD cards)?

- I cannot really help you with the most "technical" part, I'm noob with shaders!
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: 180


« Reply #2 on: May 06, 2013, 11:36:36 am »

Hi Gig,

thanks! lol. i'm dyslexci..
I agree about the glsl pak.. i actually need to remove the changes I did to the pak files in order to play online again Smiley
"skip" program -> I guess so.. shaders with 'program' keyword execute correctly with glsl disabled
screenshot -> no problem

- Is there a way to distinguish a GLSL program adapt to be used in a shader from one adapt to be used for postprocessing? -> I guess engine could be modified for this to work (i.e. define a variable in the glsl program and if that is detected only allow this program for postprocessing). Until this is done, a way of telling the difference are few uniform variables that should be part of the postprocessing program and have no place in shader glsl programs.

- When you will have some time, can you write down a list of the GLSL programs included in OA 0.8.8 package, explaining what they do? -> sure, I'll also try to comment them. but really anybody who thinks of writing glsl programs should learn glsl using Polydraw or similar, reading tutorials on glsl, etc

- I suppose one should say that the artist MUST test the shader in-game with both GLSL support enabled and disabled: the shader has to display something "reasonable" for all users. -> ok

- Do all video cards supporting GLSL give the same results, or could some GSLS programs do not work, or give different results, with different hardware (e.g. using NVIDIA or AMD cards)? -> I imagine they should.. there are few things that nvidia will accept but ati will not but this shows at compile time.. since nobody here is well versed in glsl the only way is for everybody to help test them.

I've never worked with wiki before.. when i catch some time I can upload the tutorial there.

Thanks for all your help! I'll correct the doc. I am interested to know, at which step, did the tutorial jump off in a strange direction for you? i.e. reading the tutorial if you've found yourself understanding what it is about and then finding the next paragraph talks about "something completely different"!

I'll add an example or two more of a complete glsl program in hope it will help someone.

for what is worth, some great examples (glsl programs drawn on a single flat square polygon) -> http://glsl.heroku.com/  -> maybe someone gets inspired and makes an alternative glsl background for the main menu? Wink
[edit] you would need a webgl browser to see these in action..


« Last Edit: May 06, 2013, 11:39:06 am by Hitchhiker » Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #3 on: May 07, 2013, 02:11:11 am »

If you are completely new to the wiki, converting a long article could be a problem for you. I may create the page on the wiki when I will have some time, and you may start learning the wiki by making changes to it (meanwhile, you may take a look to wikipedia markup help pages... although wikia has something different than wikipedia, both of them use mediawiki software).
In the meanwhile, you may prepare another .odt version...

Well, I would not say that the tutorial jumped in a strange direction. My problem is just that I'm noob with shaders.

For the examples in that web page, unfortunately it looks like Firefox does not support WebGL yet, so I had to use Google Chrome instead. And the machine from which I'm writing now has got stupid integrated Intel graphics, with no (or very very limited) GLSL support: most of those programs report compiling errors and do not work. I'll try from a machine with a proper video card.
UPDATE: It's not Firefox, it's that machine.
« Last Edit: May 07, 2013, 06:41:33 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.
pelya
Member


Cakes 6
Posts: 395


WWW
« Reply #4 on: May 07, 2013, 05:33:00 am »

It works on my Firefox, with Intel HD4000 graphics, however there are glitches in some examples.
Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #5 on: May 07, 2013, 06:41:04 am »

It works on my Firefox, with Intel HD4000 graphics, however there are glitches in some examples.
You're right, from the PC with a real video card, the message does not appear, and effects work.
So, maybe with Firefox it detects that the GPU sucks and triggers the message "WebGL not supported, but code will be shown." (now that I think about it, it does not specify if the browser or the graphic card does not support it)... while with Chrome, it does not detect the problem, and finds errors only while actually trying to run those webgl programs.

By the way, what happens in OA when a GLSL program compiling fails? And if compiling works, but there is some other kind of error (that would cause a "normal" program to crash)?
« Last Edit: May 07, 2013, 06:43:22 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: 180


« Reply #6 on: May 07, 2013, 11:45:50 am »

I think in Firefox you need to 'visit' a virtual webpage of the Firefox to enable it. Could also depend on the version of the Firefox. Googling says this for enabling:
"- Type “about:config” in your browser’s URL bar - Do a search for “webgl” in the Filter field - Double-click the “enabled_for_all_sites” preference to change it to “true”

that should do it... "
some programs there will fail compiling. in some cases restarting the browser helps but not for all of them.

at the moment the glsl part is skipped as far I remember (if the compiling fails). also, if any error or warning is encountered the console will show it. probably a candidate for another section in the tutorial.
 
Logged
Hitchhiker
Member


Cakes 11
Posts: 180


« Reply #7 on: May 07, 2013, 11:50:04 am »

please post your wishlist of glsl programs in this thread.

[glsl programs wishlist so far]
    -running water - 'stream'
    -still water - 'water'
    -simple 2d plasma - 'plasma'
    -simple 3d plasma - '3dplasma'
    -sparks - 'sparks'

Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #8 on: May 08, 2013, 04:45:26 am »

Hitch... Pelya created a page in the wiki with your tutorial.
http://openarena.wikia.com/wiki/GLSL
I've had a long work to fix its markup. However, other than moving the GLSL licensing infos to the bottom and adding a pre-intro at the beginning, I have done very VERY FEW changes to the text.
Most "issues" I told you previously about the tutorial still require fixing. (E.G. there is still to say that one MUST check the result playing in BOTH standard and GLSL modes... and to explain how to do the test without modifying stock pk3 files, which is bad -suggesting to create a z_glsltest.pk3 file instead?-, etc. Them all should be checked.).

Could you please take a look to it? I hope I correctly created the structure of the sections.
Then, if you are already working on a fixed .odt file, can I ask you to apply all the changes you did to the file also to the wiki? It would not be easy for me to "compare" them... it would be better if you could apply your changes also in the wiki.

Wiki markup is relatively easy, but however requires some practice. First of all, as I suggest in WikiWorks page, I suggest to DO NOT use Wikia's WYSIWYG editor -it can make damages-, but use its plain text editor instead.

Basic MediaWiki markup is
'' for italic ''
''' for bold '''
''''' for italic + bold '''''
<br /> for new line (a single carriage return does nothing; two carriage returns make a separate paragraph)
: at the beginning of a line makes the text begin more at right (more :: for more indentation) - just placing "spaces" at the beginning of a line would do nothing.
* makes a line of a list
** for a sub-list
<nowiki> text </nowiki> makes it ignore markup on the "text" part.
[http://www.openarena.ws Official site] creates an external link showing "official site"
[[Manual]] creates an internal link (Wikilink) to the "Manual" page - Please remember they are CASE SENSITIVE (except for the very first character only).
[[Manual/Graphic options]] creates an internal link to the Manual/Graphic options page
[[Manual/Graphic options#GLSL effects]] creates an internal link to the "GLSL effects" section of that page (if source and destination are IN THE SAME PAGE, one can also simply write [[#Section]], in the example [[#GLSL effects]])
[[Manual|Byebye]] creates an internal link showing "byebye" as text
==Section A title==
===Sub secton===
====Sub-sub section====
==Section N title==
To write text in "courier" style (I usually use it when I mention console commands), you can use <tt>text</tt> or <code>text</code>. I don't remember the difference now, however I usually use <tt> </tt>.
To paste sections of programs source code, the <code> tag would continue to use various mediawiki features (e.g. ignoring a single carriage return)... so I use <pre> text </pre> instead. I think that means "pre-formatted": that text will IGNORE most mediawiki conventions: you can use spaces at the beginning of the line -I suggest to use them instead of TABs-, a single carriage return will go to a new line, etc.). Unfortunately, I don't know how to use "bold" or other effects inside that, so where you had used bold in some source codes in your tutorial, I "said" to pay attention to those lines instead.
For more infos about mediawiki markup, you can take a look to Wikipedia markup help, it's similar to Wikia.

Will help you with images (uploading -only for registered wikia users-, licensing infos, markup) when you will need.

We have a forum thread about the wiki: http://openarena.ws/board/index.php?topic=4046.0
And each wiki page has got its "talk" page.
« Last Edit: May 10, 2013, 07:02:31 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: 180


« Reply #9 on: May 08, 2013, 11:26:56 am »

Thanks Gig and Pelya!
I'll try to look into this over the weekend.
Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #10 on: May 16, 2013, 12:20:55 am »

Trying to move here GLSL discussion from the OACMP thread...

as for tech demo, I edited the bsp file with hex editor and changed all texture/something/... Smiley to glshader/something/.. so basically it can be an independent map.. I'm not sure about creating a map by myself..
I think that tweaking an existing bsp file is not a good thing for a tutorial. I think you really should include the .map file to allow people take a look inside it, change something and recompile.
A fully glsl-powered version of my map could be interesting for me... but I think other people would need a simpler test map for the GLSL tutorial.

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.
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #11 on: May 17, 2013, 05:06:38 am »

I'm not a graphics developer, but that's a great initiative! Great work too, I've read your tutorial and it's very clear for me, and the concrete example at the end is simple and concise.

I agree with Gig (who often has very good ideas and feedbacks Wink ), you should provide an example .map for people to have a good basis to start from. It's always better to learn by experimenting on a practical case than from theory alone.
Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #12 on: May 17, 2013, 06:40:14 am »

NOTE: I originally posted what follows in another thread. Now I move this here because I think this thread is more appropriate. I think this is an important thing...


@ALL - A GENERAL THING ABOUT GLSL SHADERS. Let's decide this now that we actually start creating and using GLSL shaders. Fromhell's opinion would be welcome.

Guys, do you think we should "identify" shaders including GLSL in their name (e.g. adding _glsl -or simply _g- suffix to all of those shaders) -or placing all of them in a specific folder-, as a way to help mappers?
1) To help them finding shaders that include GLSL effects, if they wanna make their maps more cool
2) To help them reminding that they should test their maps with both GLSL support enabled and disabled, to be sure of the result in both cases?
OR should we assume that in future having shaders with GLSL support will became quite normal, or that GLSL code will be added also to "old" (already existing) shaders -that should not be renamed or moved for compatibility reasons-, hence specifying _glsl suffix (or placing them in a separate folder) for new shaders names only would become useless?


-----------------------------------------------
PS:
@Hitch
In the previous post I forgot to mention that, although the first alpha of my "udestruction" map was called "test2", I don't wish that map to be identified as a test map. It's true that I'm learning things during its creation, and that's not really a "pro" or "cool" map... but anyway I don't like people to think about it as a mere tech test or tutorial map. Hence, I'd prefer if you could create a specific map also for this reason (other than those I already told before)
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.
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14479



WWW
« Reply #13 on: May 17, 2013, 11:21:17 am »

Are we still doing the comments workaround for shader parser compatibility?
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
matija123
Half-Nub


Cakes 1
Posts: 63



« Reply #14 on: May 17, 2013, 03:29:40 pm »

I Have no idea what ur talking about *Getting sleepd of DeFRag* what is GLSL dude can i make some maps OR textures. ..  Angry  Grin  Wink  Cheesy
Logged

“If you tell the truth, you don't have to remember anything.”
― Mark Twain
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14479



WWW
« Reply #15 on: May 17, 2013, 03:58:59 pm »

GLSL is a way to manipulate teh pixels on the screen for new effects

before GLSL, you were quite limited and had to play with combines and strange arb assembly
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
Hitchhiker
Member


Cakes 11
Posts: 180


« Reply #16 on: May 17, 2013, 04:31:59 pm »

hi

@matija Smiley yup, I'm playing with an idea of creating one, a sort of 'universal' glsl program - shader that might shade easily an entire map - could be a good thing for defrag - to be seen and tested

@fromhell, yes - the comments are still present. as far I can see this system works well.

@Gig, your map is actually useful for me to test different things while preparing different glsl programs. not a problem to create a final glsl test map but I'll probably need to do it in Blender and will have to learn a thing or two about how Blender and q3map2 interact (mainly if texture coordinates are exported, will Radiant remove those once I import the map into it in order to add spawn points, etc..) - to be seen. But before posting anything I'll try to make a map myself and use these glsl programs in it.
as for shaders and their naming I guess keeping the original name should be ok but the glsl program will have to be done in a way so that it behaves and does only a simple thing - I've made few example 'banding' programs that are geometry/position dependent and I imaging when a mapper decides to use these, they are the only ones that will probably be best left in a completely new shader (this new shader could then include both non-glsl shading commands as well as glsl ones).
I believe OA now has a patch to load shaders depending on the renderer which is used? Not useful in this situation but maybe something to consider when discussing the naming? I dont know at the moment - need to think it over.

@GrosBedo, thank you! I was starting to think I would not finish the tutorial - not knowing if I'm making any sense there at all.. once I finish all the programs I'm making I believe I'll be able to re-do the tutorial so it will be even simpler to understand.

I'll try to post a simple glsl map this weekend.
Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #17 on: May 18, 2013, 03:49:20 am »

Just a small post.
I know that "fake comments" workarounds are not elegant... but I think that having the glsl part clearly separed from the rest of the shader is a good thing, so I suggest to continue using the //GLSL thing.

A note for Sago and Fromhell: I suppose we should add the GLSL option in the GUI in the next OA version. It could still be disabled by default for compatibility reasons if you wish... but people should be able to know it exists and to enable and disable it comfortably. Who could imagine what the long-named variable does, unless occasionally reading about it on the wiki or on the forum?
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: 180


« Reply #18 on: May 19, 2013, 02:07:34 pm »

I agree with a menu option and using the //GLSL comment. Also, trying to see different blendfunc options for water effect I find that it might be a good idea to have a separate shader stock that could be looked up first to find a specific shader (only if glsl is enabled). I dont know if this can be done with the existing patch for different renderers?
Today trying to get the stream glsl program in 'final' version I've found that the //GLSL keyword is processed even if glsl is disabled so this might be a good thing to correct in the next release (i.e. to skip the comment/keyword characters only if glsl is enabled).

An advantage of using separate shader files for glsl would also be less passes (less polygon drawn if I understand the passes correctly).

Here is the 'stream' glsl program for you to try. Please read the .shader file for more instructions on how to use it.

Logged
Hitchhiker
Member


Cakes 11
Posts: 180


« Reply #19 on: May 19, 2013, 02:12:17 pm »

Not much sparks as I was hoping it'd be but still a nice effect. Different variants inside.
Logged
CGB01
Half-Nub


Cakes 2
Posts: 63



« Reply #20 on: May 19, 2013, 02:42:56 pm »

Hitchhiker, can you upload the following images.  They are used in your shaders but are not in the zip file.

gig_stripes1.tga
pebbles1.jpg
3605-normal.jpg

Looking forward to trying the shaders Smiley

Thanks.
Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #21 on: May 20, 2013, 12:29:26 am »

Hitchhiker, can you upload the following images.  They are used in your shaders but are not in the zip file.

gig_stripes1.tga
pebbles1.jpg
3605-normal.jpg

Looking forward to trying the shaders Smiley

Thanks.

Gig_stripes1.tga and pebbles1.jpg are two files from my udestruction v7 pk3:
http://openarena.ws/board/index.php?topic=4679.msg46959#msg46959

About 3605-normal.jpg... I have no idea.
In a note in the shader file, Hitch tells "find a normal map file (the one I have is not GPL)"... but I have no idea of what kind of image should I find.

« Last Edit: May 20, 2013, 04:06:58 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 48
Posts: 4237


WWW
« Reply #22 on: May 20, 2013, 01:41:04 am »

Hitch, we have a problem here.

I tried to test the sparks shader.
1) I placed glsl_sparks.shader in my "scripts" folder.
2) I edited it, replacing references to "glshader" folder with "textures" folder (so, shader would appear as/be applied to "textures/gig/gig_stripes1", and would load my "textures/gig/gig_stripes1.tga").
3) I removed (by changing its extension) my existing .shader file that holds the original version of the stripes shader. This way, I'm sure the GLSL version is loaded instead of my original one.
4) I placed sparks_fp.glsl and sparks_vp.glsl (the version in the main folder of your zip) into a "glsl/sparks" folder.
5) I started OA and loaded my map (sv_pure 0, devmap udestruction)
6) I set r_ext_vertex shader 1, then vid_restart
7) I see the sparks as usual. Something went wrong!
8) I pull down the console. It says that:
Quote
Error:
Vertex shader failed to compile with the following errors:
ERROR: 0:6: error(#160) Cannot convert from 'attribute4-component vector of
float' to 'default varying 3-component vector of float'
ERROR: error(#273) 1 compilation errors. No code generated

Couldn't compile vertex shader for program sparksWARNING:
RE_GLSL_registerProgram failed for 'program sparks' in shader
'textures/gig/gig_stripes1'

Did I do something wrong?

PS: same happens also if I try with the other three versions of the "sparks" glsl program.
« Last Edit: May 20, 2013, 03:58:01 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: 180


« Reply #23 on: May 20, 2013, 09:07:44 am »

I'll check the error part and try to find why it fails.
As it fails to compile, OA disables the glsl so things show as usual.
as for normal map just google images for 'normalmap water' and take one with size in power of 2 (128x128, 256x256, 512x512..).
I've just made one so I can say it is GPL and here attached. Smiley
« Last Edit: May 20, 2013, 09:13:37 am by Hitchhiker » Logged
Hitchhiker
Member


Cakes 11
Posts: 180


« Reply #24 on: May 20, 2013, 09:18:31 am »

Hitch, we have a problem here.

I tried to test the sparks shader.
1) I placed glsl_sparks.shader in my "scripts" folder.
2) I edited it, replacing references to "glshader" folder with "textures" folder (so, shader would appear as/be applied to "textures/gig/gig_stripes1", and would load my "textures/gig/gig_stripes1.tga").
3) I removed (by changing its extension) my existing .shader file that holds the original version of the stripes shader. This way, I'm sure the GLSL version is loaded instead of my original one.
4) I placed sparks_fp.glsl and sparks_vp.glsl (the version in the main folder of your zip) into a "glsl/sparks" folder.
5) I started OA and loaded my map (sv_pure 0, devmap udestruction)
6) I set r_ext_vertex shader 1, then vid_restart
7) I see the sparks as usual. Something went wrong!
Cool I pull down the console. It says that:
Quote
Error:
Vertex shader failed to compile with the following errors:
ERROR: 0:6: error(#160) Cannot convert from 'attribute4-component vector of
float' to 'default varying 3-component vector of float'
ERROR: error(#273) 1 compilation errors. No code generated

Couldn't compile vertex shader for program sparksWARNING:
RE_GLSL_registerProgram failed for 'program sparks' in shader
'textures/gig/gig_stripes1'

Did I do something wrong?

PS: same happens also if I try with the other three versions of the "sparks" glsl program.

Hi Gig,

I think you did all right!

Can you please try changing the line in spark_vp.glsl from:
vertex=gl_Vertex;
to:
vertex=gl_Vertex.xyz;

That should fix it.

Logged
Pages: [1] 2 3 ... 8
  Print  
 
Jump to: