Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
timmie

Shaders in 0.75

Recommended Posts

Well, I decided to bump shader support up to 0.75 for the fun of it, so I've been working on the shader specification and here's what I have so far: http://timmie.squabble.org/docs/shaders.txt

Just looking for comments suggestions here. I've already got a bunch from my beta testers, but I figured I'd toss this out here as well!

edit: I uploaded some sample shaders that we've been testing with to give you some examples of how things work in practice: http://timmie.squabble.org/docs/shaders.wad

Share this post


Link to post

Hmm, probably best to assume so. It uses the existing ZDoom script parser stuff, so if that's case sensitive then this is, too.

edit: quick double check looks like it is not case sensitive

Share this post


Link to post

Another update: http://www.timmie.squabble.org/docs/shaders.txt

I forgot to add in there that after the color/alpha cycle keyword, you can say sin or cos to give a smoother cycle effect (instead of straight linear):

color cycle sin 1.0 0.0 0.0 0.0 0.0 1.0 2.0 // cycle from red to blue over 2 seconds
alpha cycle cos 0.5 1.0 2.0 // cycle from 50% to 100% alpha over 2 seconds

Share this post


Link to post

I've got a couple of problems i was hoping you could help me with, first: I for some reason can't get that wad file for the shaders (Security on Internet Explorer maybe?) and second: there is contstruction on a house nearby and they have dump trucks that back up with the beep beep, and my dog (2 1/2 feet tall, 75lbs. (about 37.5 kilograms) 5 feet long from nose to end of tail) is scared of it. Will not leave me alone. Stupid dog. I like that dog though, but he's the wimpiest creature ever. Period. Or semicolon. Whichever you prefer. I'm rambling. I'll shutup. Now....... okay now.

Share this post


Link to post

Hmm, that's strange. I just did a "right-click/save as" on the wad and it saved fine =/

As for the dog, try spraying it with water. Or take it for a walk. That always worked for my old dog :)

Share this post


Link to post

Well i did the right click thingy and it comes up with an error saying file copy error "file system error (1026)." is there a certain folder or any security issues? or can i get the file somewhere else? Is windows 98 the problem? (You know, windows 98 SUCKS!)

Share this post


Link to post

Or I can just post what was in it...

This is in the "SHADERS" lump (plain text):

shader FWATER1 FWATER2 FWATER3 FWATER4
{
   layer FWATER4
   {
      vector cycle -0.1 -0.1 0.1 0.1 4.0
      vectorFunc cos sin
   }
   layer FWATER4
   {
      alpha cycle sin 0.35 0.45 2.0
      vector 0.1 0.125
   }
}

shader BFALL1 BFALL2 BFALL3 BFALL4
{
   layer BFALL4
   {
      vector 0.0 -0.2
   }
   layer BFALL4
   {
      alpha 0.5
      offset 0.5 0.0
      vector cycle 0.05 -0.1 -0.05 -0.1 2.0
      vectorFunc sin linear
   }
}

shader BIGDOOR1
{
   layer BIGDOOR1
   {
   }
   layer FWATER1
   {
      blend add
      texgen sphere
   }
}

shader BLOOD1 BLOOD2 BLOOD3 
{ 
   layer BLOOD1 
   { 
      vector 0.1 0.1 
      offset 0.4 0.0 
   } 
   layer BLOOD1 
   { 
      offset 0.1 0.2 
      vector -0.2 0.2 
      alpha 0.3333
      scale 1.2 1.2 
   } 
   layer BLOOD1 
   { 
      alpha 0.3333 
      offset 0.2 0.1 
      vector 0.1 -0.2
      scale 1.5 1.5 
   } 
}

Share this post


Link to post

Ok, I just ditched the "blend" layer parameter in favour of "blendFunc", which is basically a way of specifying your own blending parameters for increased flexibility.

"blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA" would give you normal blending while "blendFunc GL_SRC_ALPHA GL_ONE" gives you additive blending.

For more information, check out the documentation on the glBlendFunc() OpenGL function: http://tc1.chemie.uni-bielefeld.de/doc/OpenGL/hp/Reference/glBlendFunc.html

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×