Twosided glass?


(Igloo) #1

Hi there,

I’ve got (probably) a shader problem. I want to make one brush that has two sides of transparent glass. So when you look through the first one you can see the second and everything farther. Like in a real life :wink:

I use the same shader for the first side and the second, the whole rest of the rectangle has “nodraw”:

textures/testes/glass01
{
	qer_editorimage textures/common/s_glass.tga
	qer_trans 0.5
	nomipmaps
	nopicmip
	{
		map textures/common/s_glass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		//rgbGen vertex
	}
}

But it doesn’t work - what do I need to change? Not sure hmm…

I cannot compile the map, this will be just a model to the existing one :slight_smile:

Thanks!


(Wezelkrozum) #2

Add “cull none”:

textures/testes/glass01
{
	qer_editorimage textures/common/s_glass.tga
	qer_trans 0.5
	nomipmaps
	nopicmip
	cull none
	{
		map textures/common/s_glass.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		//rgbGen vertex
	}
}

cull controls which sides are visible


(kamikazee) #3

[QUOTE=wezelkrozum;193734]Add “cull none”:[snip]

cull controls which sides are visible[/QUOTE]And if that doesn’t fix it, please be more specific in which things don’t exactly work as they should.


(nUllSkillZ) #4

As far as I remember two sides of glass are “bad”.


(Igloo) #5

It might be a bad idea to use 2 same check textures of glass ( # ), coz it doesn’t look well with smaller grids. But I used textures/sfx/tramglass2 (inside the building) and textures/sfx/safety_glass (outside)… kinda panzer glass then :slight_smile:


(stealth6) #6

why don’t you just use a normal glass shader and then just put 2 brushes opposite eachother?


(aaa3) #7

i wanted to post it too but if its cloned a lot its not good (the fewer brushes the better, models or patches does not count only brushes in this), but yes it is the most obvious solution for a single or few ones.
or not… with the drilled-in thriving for efficiency i’d have first gone for the 1brush solution as well