Sun/Sky shader problem


(Dyalhenauss) #1

My shader looks like that (I took it from Goldrush and modified the q3…sunExt and changed the name of full_moon2) :

http://pastebin.com/f609a366

My textures folder looks like this :

textures/skies_dyal

			goldrush_clouds.tga
			goldrush_mask.tga
			moon.tga (alias full_moon2 on goldrush)
			nightsky1.jpg
			small_moon.tga

textures/skies_dyal/wurzburg_env

					sky_bk.tga
					sky_dn.tga
					sky_ft.tga
					sky_lf.tga
					sky_rt.tga
					sky_up.tga

My problem is that everything works fine EXCEPT the moon, when I set “r_drawsun 1”, instead of seeing the moon like in Goldrush, I see a black square.


(Wezelkrozum) #2

Did you create an alpha-channel for the moon and save it as a 32bits-tga file?


(Dyalhenauss) #3

I didn’t edit the .tga


(Wezelkrozum) #4

When you open the console is there missing a texture? If so, and it does mis the full_moon2.tga texture. Your shaders isn’t read by the game.


(Dyalhenauss) #5

The shaders are read by the game, I even added “qer_editorimage textures/skies_dyal/nightsky1.jpg” and it’s well shown in gtkradiant.


(Wezelkrozum) #6

Read by gtkradiant is something else than read by the game :slight_smile: But then I have no idea how to fix it.


(Dyalhenauss) #7

When compiling, it says “entering script skies_dyal.shader”, I don’t see why wouldn’t the game see it, as far as I see the sky etc. ingame, just not the moon (being a kind of “sun”).


(Pande) #8

It never ceases to amaze me the lengths people go through to get things. :smiley: Just merge the sun image and the sky in PS. :slight_smile:


(Wezelkrozum) #9

While trying to sleep tonight I found out that the moon has a shader too. So, find the “full_moon2” shader and rename it to “moon”.


(Dyalhenauss) #10

textures/textures/skies_dyal/moon/moon
{
cull none
nofog
{
map textures/skies_dyal/moon.tga
blendFunc GL_SRC_ALPHA GL_ONE
rgbGen identityLighting
}
}

Was already not working when the moon was named full_moon2…


(Wezelkrozum) #11

It right that it doesn’t work because it should be textures/skies_dyal_moon


(Dyalhenauss) #12

It finally works, woo!
And lol at me for not even having seen this huge mistake, thanks & thanks again for having helped me with this solved problem Wezel!
Thanks!
You definitely won a thanks in my readme file, :D.


(Wezelkrozum) #13

You’re always welcome:) And feel free to discuss an other problem with us when you stuck.


(Pande) #14

Why must the images be seperate though, seems a waste.


(Wezelkrozum) #15

The sky links to the sun texture. Which needs a shader to blend the alpha channel of the sun.


(Pande) #16

Well, that’s a huge waste of effort imo unless your animating the sun. :s which by his shader, is not being done.

also, you put cull none in their which is also a waste since you can’t see the other side, ever.