Portal Camera Shaders... B/W?


(demoneye) #1

Hi,

I’m using a misc_portal_camera and a misc_portal_surface to have create some security cameras and monitors in my RtCW map, but want to know if it’s possible to convert the shader to produce black and white output. Here’s the shader, can it be amended?

Thanks to Fiesling for the original shader…


textures/delivery/viewscreen
{
	qer_editorimage textures/delivery/portal.tga
	portal
	surfaceparm nolightmap
	surfaceparm glass
	{
		map textures/delivery/portal_ground.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		depthWrite
	}
	{
		map textures/delivery/scrollbar_portal.tga
		blendfunc gl_src_alpha gl_one_minus_src_alpha
		alphagen portal 1024
		rgbGen identityLighting	
		tcmod scroll 3 1
	}
	{
		map textures/delivery/portal_noise.tga
		rgbGen identity
	   	tcMod scroll 4 4 
		depthWrite
		alphaFunc GE128
	}
	{
        	map textures/delivery/screenfx.tga
        	tcGen environment
		blendfunc add
		rgbGen identity
        }
}

Cheers

DeMoNeye


(chavo_one) #2

Just a thought, but would adding “rgbGen const 0.5 0.5 0.5” or something like it to one of those stages do the trick? :???:

Maybe that’s not what rgbGen const is able to do. Regardless, it could be something to try until the right answer comes along. :smiley: :beer:


(system) #3

Take this shader. It’s better:


textures/my_portal/portal_tex
{
	qer_editorimage textures/my_portal/a_portal.tga
	 // surfaceparm playerclip
	surfaceparm nolightmap
	portal
	{
		map textures/my_portal/a_portal.tga
 		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		depthWrite
		alphaGen portal 2048
    }
}

textures/my_portal/portal_tex2
{
	qer_editorimage textures/my_portal/a_portal2.tga
	// surfaceparm playerclip
	surfaceparm nolightmap
	portal
	{
		map textures/my_portal/a_portal2.tga
 		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		depthWrite
		alphaGen portal 2048
    }
}

Let me know if you can get the stuff work in b/w because atm i’m adding a security camera-system for my “Bunker-Hill” too.


(Charmin Deluxe) #4

i dont want to open a new topic and so i post my question in this topic :stuck_out_tongue:


textures/jedyacademy/screen
{
	qer_editorimage textures/jedyacademy/screen.tga
	portal
	{
		map gfx/2d/lagogglesWindow.tga
		blendfunc gl_dst_color gl_src_color
		tcMod scroll 70 45.5
		tcMod scale 3 2
	}
	{
		map textures/kejim/screen.tga
		blendfunc add
	}
	{
		map gfx/colors/black.tga
		depthWrite
		alphaGen portal 256
	}
}

this my portal shader pit i have the porblem that i use 4 screenbrushes. but no one of the one misc_portal_surcace touches he 64 units radius of another portal_surface but on all 4 screens is the same picture of 1 of the misc_portal_surfaces … any idea to fix this problem?


(Charmin Deluxe) #5

$&/$$% shit error …double post :banghead:


(Charmin Deluxe) #6

the same :angry:


(Charmin Deluxe) #7

:bash:


(Charmin Deluxe) #8

sry :banghead: