special binocs shader


(ailmanki) #1

Curious if it would be possible, to give each player a special shader which in combination with the binocular shader would react?
Normally a shader is just applied on top of the view, so it kinda filters it, there are green and red filters for the binocular, but the only thing they do is make the hole scene green or red…

Now it would be nice if it would be possible with some trick, to give the players uniform a special shader, and the binocular also, so that both together give a special effect? While the map around it, would just be filtered…

Yer I am lazy and I have not tested it out, I suppose it is possible with some shader keywords/combinations, I hoped some experienced mapper knows how to combine shaders for such an effect…


(IndyJones) #2

i do not see a solution to this… well, maybe one but it wouldn’t be exactly what you are looking for.


(UJERebel) #3

Would be nice if you succeed making it…
colorfiltering binocshaders, temperature binocs and stuff,… nice :smiley:


(dutchmeat) #4

Hey ailmanki,

Can’t you peek in the Sof2 source how they’ve done it?


(ailmanki) #5

Well then experimenting… I hope some fancy shaders will do it…
Have to read through shader manual (again)…
edit:
depthwrite and depthfunc I hoped I could use them… Seems not.
So next to try which I forgot at first is sort keyword… maybe lucky…


(ailmanki) #6

no luck… sort did not do the trick either…
Maybe some fancy shaders could enhance the view, but thats hardly possible with the player skins… if they would be pure red and blue that would be possible.
so for me case closed - not possible. At least not without a mod.


(IndyJones) #7

did u try to change the shader for BOTH binocs and player textures?


(ailmanki) #8

yes I tried that also, different values for sort, it has not changed anything, no matter what sort value I used.

It would have been nice, to have the binocular painted behind the player and the reticle over it, that would open room for alot of things. Even if it would not have been realistic heat or something like that, surely something nice could have been done.

I have not fully underestood depthwrite and depthfunc… but I guess it is not thought for multiple shaders, rather for stages. :confused:

edit: maybe a vid_restart was not enough to load the new sort keyword? … although entering a invalid value did yield an error.


(IndyJones) #9

i was thinking more about thermal scope.

yeah, cod stuff :smiley:
maybe it would be possible to draw special alpha channel in white OR black color, when looked thru special alpha of binocs. i think it’s possible.


(Scennative) #10

i have make it with coding. it was 5 lines to change/add…

Here the Video

http://de.xfire.com/video/2e4305/


(IndyJones) #11

i know it’s not hard, but i’d rather achieve it for all mods, by using what everything is supporting. :slight_smile:

maybe try to make it? here is how it looks in mw2:

shouldn’t be very hard, just make the player skin shaders be allwhite with no lighting (i used such shader on italy), and for binocs, add some noise to the view and make it moving quite fast (seamless).


(Scennative) #12

Hehe Wallhack xD I must add the no lighting shader

http://de.xfire.com/video/2e4391/

Edit:

Here without Wallhack and perfectly white shader on players…


(nUllSkillZ) #13

As far as I remember there is already a binoc mod.
But it changes not only the players.
You should have a look at RTCWFiles.com


(UJERebel) #14

That looks nice, but you could you make something like a thermotexture instead of the white? so it looks like a real thermal vision? looking great so far!


(system) #15

that looks like a butt dude


(IndyJones) #16

don’t make wallhack, just draw white texture on players when they are in player view range.


(Scennative) #17

Yes i have it now :slight_smile: When you dont make a shader, you become a wallhack…
But when you add a shader, then it´s normal :stuck_out_tongue:

I do upload a video, but now i am hungry :stuck_out_tongue:

I have make it per Skill: When you are on the Sniper Level 4, you have the normal Binoc. When you are Sniper on level 5 you become the Thermal Binoc

Here the Video:

http://de.xfire.com/video/2e4af7/


(ailmanki) #18

Cool thing scennative, but IMHO you have to polish it… :slight_smile:

  • white skin feels wrong
  • skin changing with thirdperson also wrong
  • skin not changing with sniper gun…

If you can … Make the scene black/white, paint everything darker, and the players brighter - but not pure white.

Thirdperson is almost never used or seen anyway, but well the skin change should only happen when looking through the Binocs. I guess you made that for testing reasons.

Dunno about the sniper scope, some special view enhancment would be nice aswell, but in your clip, you have a special scope … so it won’t be as easy as changing skins :smiley:


thats all I found… did not look for long though … looks like inverted.


(IndyJones) #19

i guess the scope is just a texture wich doesn’t have black spot around. some kind of ‘sprite’ weapon.
ike i said, for thermal scope some grunge/noise is needed, u should be able to make it ‘scrolling’ via shader. easy task.


(Scennative) #20

new Update:

http://de.xfire.com/video/2e51f6/