Talk:Vision Nocturna

From Valve Developer Community
Jump to: navigation, search

This might be a valid abstract mapping topic...who agrees?—ts2do (Talk | @) 09:34, 9 Nov 2005 (PST)

Ooh! Ooh! I do! Pick me! —Maven (talk) 18:21, 9 Nov 2005 (PST)
hu? what do you mean? I know its got scripted elements, but thats just how i programm. --Amckern 19:17, 9 Nov 2005 (PST)

...abstract mapping at first meant hammer mapping...now it means mapping out abstract ideas...it includes programming—ts2do (Talk | @) 19:19, 9 Nov 2005 (PST)

I know you said its only a first draft, but i would consider making mat_fullbright a cheat convar again, with out that, it can be exploited like crazy(you could do night vision, without the green overlay by simply entering mat_fullbright 1 in the console!) There should be a way to set a cheat cvar from code that doesn't require sv_cheats...

There is a bit flag value for no target that I have used in another feature in nightfall, but I don’t know how to make new bit flag values, or how they operate...

Here is an easy way to change mat_fullbright without changing the FCVAR_CHEAT:

// Activate:
cvar->FindVar("mat_fullbright")->SetValue(1);

// Deactivate:
cvar->FindVar("mat_fullbright")->SetValue(0);

// Check:
if (cvar->FindVar("mat_fullbright")->GetInt() == 1)
 // Activated
else
 // Deactivated

This way you can keep mat_fullbright cheat-protected, but you can change it in code :). --Jerry (MrU on VERC) 02:19, 6 Dec 2005 (PST)

I don't like the fullbright approach anyways...dark areas should still be quite dark when they're on—ts2do (Talk | @) 05:58, 6 Dec 2005 (PST)

True, I could make a tutorial for a shader (pixel-shader) which does the same thing, but is much better ;). --Jerry (MrU on VERC) 06:04, 6 Dec 2005 (PST)

Performance enhancement

It looks like this algorithm can run much quicker if we only load up the material (pMaterial) if we're turning night vision ON. Otherwise we're doing a costly material lookup without using it.

Azound 23:57, 15 Jan 2006 (PST)

Abstract Coding

This is definately a candidate for abstract coding because it's very simple to say "How do I make NightVision?"—ts2do 09:59, 29 Jan 2006 (PST)

Simple to say, but hard to understand. If your going to move this again, and with all your other 'edits' in the vdc, i will recomend your account to be removed.

why are you so harsh about this? abstract coding focuses on exactly what this tutorial is...turning the abstract idea of nightvision into code...—ts2do 06:51, 30 Jan 2006 (PST)


Confusing

You've listed a non-shader way, and a shader way. Assuming we go and write the shader and compile it, how do we use the shader, just call the material as a screen overlay? (Assuming the VMT is set up with the proper shader) Lord Ned

  • This whole article really needs a rewrite. The non shader method should never be used in production code, that is a complete hack. And the shader code needs to be rewritten for the latest SDK. Setting up a screenoverlay material like that is quite hacky the correct way of doing a PostProcess effect is deriving from IScreenSpaceEffect as discribed in ScreenSpaceEffects.cpp. A proposal: Lets ditch this article, and rewrite the shader part as a Snippit. Not to mention why the fuck is the title in spanish? --DaFox 13:32, 20 April 2011 (UTC)
  • I tried out the shader method, It really just needs to be written from the ground up. Heres what it looks like this[1] ugh. I'm rewriting it aiming for something like this: http://www.youtube.com/watch?v=wXxdq_mFAzg&fmt=5#t=15s --DaFox 21:33, 22 April 2011 (UTC)