Source Shader Editor, a WYSIWYG shader editor from our frien

Grab your favourite IDE and tinker with the innards of game engines

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby gladers on Sat Jul 30, 2011 8:56 pm

I set the fallback texture to the grain, this worked :D
Out of intererest how would i specify this in the .vmt files?

Any problems using multiple shaders at once?
gladers
Member
Member
 
Joined: Sat Feb 27, 2010 2:53 pm

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby -=Biohazard=- on Sat Jul 30, 2011 9:44 pm

The parameter was 'Basetexture' apparently, you can see that in the top left drop down menu. If custom parameter is specified you can type in a custom name for the parameter on the right side.

So it seems that it should have loaded that 'white' texture, maybe your mod isn't mounting whichever gcf has it. I was a tack too lazy to use the standard texture system for those because that'd require me to mix both and that's a mess just for the fallback code :P .

What do you mean by using multiple shaders at once? You can use them in as many vmts as you want and specifiy different settings in each, at least it should work like that.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby Knights on Sat Jul 30, 2011 9:54 pm

I saw this awhile ago too, truly something VALVE NEEDS TO UPDATE WITH THEIR ENGINE>> :lol:
Image
Random gallery... Knights_Stuff.
Home page --> http://www.knights.interlopers.net/
User avatar
Knights
May Contain Skills
May Contain Skills
 
Joined: Tue Aug 01, 2006 4:35 pm
Location: In a van down by the river

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby gladers on Sat Jul 30, 2011 11:34 pm

Just wondering how much of a performance hit it is using shaders and using several at once for film grain, night visions and drunk ontop ;)

We have a user test base of 300 people, we mostly find that a lot of the testers dont have great pcs (and for an ep2 mod most dont have ep2 or have it installed, but they are still happy playing with missing textures and missing models!).

Would a menu option to disable shaders be wise for me to add onto my mod or do you think they can handle it?
gladers
Member
Member
 
Joined: Sat Feb 27, 2010 2:53 pm

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby -=Biohazard=- on Sun Jul 31, 2011 2:48 pm

If possible I'd combine the shaders and only draw either of them, like adding film grain to the drunk shader and then only drawing the latter (you can copy and paste nodes between files, so this should be easy to do :wink: ).

Though generally you could just 'guess' or test how expensive a shader is and then possibly make a cheaper version for older pcs. The film grain shader should be rather cheap for example, but the drunk shader is kinda expensive (you could make a cheap version without the blur loop). It does a lot of lookups per pixel and has expensive arithmetics - though I'm sure there's still room to optimise it anyway. All of the example files I released alongside with the editor were just a result from messing around actually, I didn't really bother to optimise them or anything, and some should be drawn onto a downsampled RT too.

Also make sure that the graphicscard can handle the shader model you compiled, although I guess sm 3.0 shouldn't be much of an issue these days anyway.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby Surfa on Sun Jul 31, 2011 2:57 pm

Was just wondering is there is a code node similar to what there used to be in the udk (before epic removed it grrr) like a node which you specify inputs/outputs and can link it to other nodes but it allows you to write your own hlsl within the node?
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby -=Biohazard=- on Sun Jul 31, 2011 3:48 pm

Surfa wrote:Was just wondering is there is a code node similar to what there used to be in the udk (before epic removed it grrr) like a node which you specify inputs/outputs and can link it to other nodes but it allows you to write your own hlsl within the node?


Right now there isn't, although I just had to add a sampler datatype for something else so it would make more sense to actually create such a node now (wouldn't be that useful if you couldn't do lookups even).

What specifically would you use it for though? The only reason I could see atm would be matrices of arbitrary size or something, so if I'd add one what do you think should it be supporting at least?
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby Surfa on Sun Jul 31, 2011 4:10 pm

I think personally it was more of a little thing I wanted so that you could keep the number of nodes down to a manageable size but I also thought it would be useful for people who want to learn hlsl and shader authoring to be able to generate complex shaders in hlsl without having to really dig into the c++ aspect of the shader sdk. But I guess it was more of a suggesting for something to consider as I am not really knowledgeable in this area and I am no longer working with source.
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby -=Biohazard=- on Sun Jul 31, 2011 5:23 pm

Regarding the amount of nodes I had 'template nodes' in mind or something (I think i mentioned it somewhere in the thread).

But yeah, I was also considering such a node at some point, though I'm not too sure which functionality I should definitely provide for it so it's actually really useful, that's why I was wondering if you'd have anything in mind specifically.
Alone the 'learning HLSL' aspect is a good one though, I'll probably provide such a node at some point (hoping that the vgui richtext element can be made editable).
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby Cryatal on Tue Aug 02, 2011 8:17 pm

Iv just created a near death post processor effect and it works perfectly when the game starts up, however, i only want the effect to be visible while the player is below 15 hp. How do i code this in my mod.
Cryatal
Dumpling
Dumpling
 
Joined: Tue Feb 08, 2011 2:20 pm

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby -=Biohazard=- on Wed Aug 03, 2011 2:38 am

This page has example code to draw a post processing effect and then you just need to get the player with C_BasePlayer::GetLocalPlayer() and access the health int to see if you want to draw it at all.
You could also send the health to the shader with one of these to fade the effect in some special manner inside the shader.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Source Shader Editor, a WYSIWYG shader editor from our f

Postby Cryatal on Wed Aug 03, 2011 12:53 pm

Thanks, thats just what i was looking for.
Cryatal
Dumpling
Dumpling
 
Joined: Tue Feb 08, 2011 2:20 pm
Previous

Return to Programming

Who is online

Users browsing this forum: No registered users

cron