shader problem! ( 2 :) ) sun disappears


(Wezelkrozum) #1

As you can see the first screenshot the sun is invisible. If I look to the right the sun appears again, the 2nd screenshot. I think there is a problem with the fog, but I couldn’t solve it.

This is the shader I use:


textures/wezelkrozum_skies/sky1
{
	nocompress
	qer_editorimage textures/skies_sd/nero_bluelight.tga
	q3map_lightimage textures/skies_sd/siwa_clouds.tga
	q3map_nofog

	q3map_sun 0.75 0.70 0.6 135 199 49
	q3map_skylight 75 3
	sunshader textures/wezelkrozum_skies/sun1
	
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight
	surfaceparm sky
	
	skyparms textures/skies_sd/wurzburg_env/sky 512 -

	{
		clampmap textures/skies_sd/siwa_mask.tga
		tcMod scale 0.956 0.956
		tcMod transform 1 0 0 1 -1 -1
		rgbGen identityLighting

	}

}

textures/wezelkrozum_skies/sun1
{
	nocompress
	cull none

	{
		map textures/skies_sd/siwasun.tga
		blendFunc blend
		rgbGen const ( 1.0 0.95 0.9 )
	}
}

The first is the sky and the second is the sun.
I tried to apply,
surfaceparm noimpact
surfaceparm nolightmap
q3map_nofog
to the sun shader, but it won’t give any effect.

Hope someone can solve the problem.

Wezelkrozum


(IndyJones) #2

i think that your skybox is too big.


(Wezelkrozum) #3

I think there must be a way to let the sun appear also with fog.


(pazur) #4

I have a slightly different approach for the sun in my map. It’s in an alpha shader (sky_mask1.tga):

Video of shader: http://de.video.yahoo.com/watch/3221931/9098934


textures/paz/wolken
{
	qer_editorimage textures/paz/qer_sky.tga

	q3map_lightImage textures/paz/sky_detail1.tga

	q3map_sunExt 0.4 0.4 0.45  400 -30 45 16 12
	q3map_skyLight 140 3

	surfaceparm sky
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight

	skyparms textures/paz/env/sky 1500 -

	nopicmip
	q3map_nofog


	{
		map textures/paz/sky_detail1.tga
		tcMod scroll 0.001 -0.003
		rgbGen identityLighting
	}
	{
		map textures/paz/sky_mask1.tga
		blendFunc GL_ONE_MINUS_SRC_ALPHA GL_SRC_ALPHA
		tcMod transform 0.25 0 0 0.25 0.1075 0.1075
		rgbGen identityLighting
	}
}

I have fog in my map too:

Worldspawn has:
_foghull paz/wolken
_farplanedist 14336 <- this one is removing stuff from vis that is really far away
_fog textures/paz/nebel


textures/paz/nebel
{
	qer_editorimage textures/paz/qer_nebel.tga
	surfaceparm nodraw
	surfaceparm nonsolid
	surfaceparm trans
	surfaceparm fog

	fogparms ( .827451 .827451 .827451 ) 20000
}

BTW: I added it to the shader section of my website: http://www.geocities.com/pazurmapping/shaders.htm