Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / Wanted: Underwater Shader

Author
Message
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 4th Aug 2012 18:46 Edited at: 4th Aug 2012 18:47
No, the only thing you can really do at the moment is alter an existing shader you aren't using. The built-in shaders (in addition to multi.fx) that use external textures are:

filmreel (1 external texture)
gasmask (2 external textures)
rain (2 external textures)
refract (1 external texture)

Remember, all the other shaders can duplicated/renamed as many times as you need, because they don't use external textures.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
Pirate Myke
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 4th Aug 2012 18:52
thats to bad then. Well got to do what you can.

Thanks for the information and your time in explaining why this could not be done. I will tinker with the other multi shaders and see what I can come up with to accomplish what I want.

Thank you.

BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 4th Aug 2012 19:30
Quote: "But for post shaders that use external textures, you can't do this. I have provided one "slot" for users called "multi.fx" that can use two external textures - and this is why I named the water shader in this manner - to use the one user-defined "slot".

If you'd like, I can add more slots to the source code. How many do you think most users would need for a typical game? I'm thinking 3-5 for most FPSC power users."


We expanded the posteffect slots ourselves to 5 for our developments and that seems about a good amount. We've only used 3 out of the 5. A few may need more down the line, but having the 5 added to the source may be good for others.


Twitter: @NFoxMedia
Pirate Myke
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 4th Aug 2012 19:37
Would I add them in these sections in bold?

/***************************************************************************************************************
This multi-technique shader provides an automatic adaptive bloom effect based on screen brightness to scale the bloom effect
Shader code by Mark Blosser
email: mjblosser@gmail.com
website: www.mjblosser.com
released under creative commons license by attribution: http://creativecommons.org/licenses/by-sa/3.0/

********************************************************************************************************************/

string Description = "Multi Post-Process Shader by bond1";

/**************UNTWEAKABLES******************************************************************************/

float2 ViewSize : ViewSize;
float time : Time;




//---------------RENDER TARGET TEXTURES--------------------------------------//

//starting scene image
texture frame : RENDERCOLORTARGET
<
string ResourceName = "";
float2 ViewportRatio = {1.0,1.0 };

>;

sampler2D frameSamp = sampler_state {
Texture = < frame >;
MinFilter = Linear; MagFilter = Linear; MipFilter = Linear;
AddressU = Clamp; AddressV = Clamp;
};

texture scratches : DIFFUSE
<
string ResourceName = "";
>;

sampler scratchesSamp = sampler_state
{
Texture = <scratches>;
MinFilter = Linear; MagFilter = Linear; MipFilter = Linear;
AddressU = Wrap; AddressV = Wrap;
};



//-------------STRUCTS-------------------------------------------------------------

struct input
{
float4 pos : POSITION;
float2 uv : TEXCOORD0;
};

struct output {

float4 pos: POSITION;
float2 uv: TEXCOORD0;

};

BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 4th Aug 2012 20:00
Quote: "Would I add them in these sections in bold?"


Are you asking if this is where you would "expand" the slots? If so, no. The slots are defined in the engine source. The post effects that use texture(s) are defined and loaded. The only way to expand is to have the source add slots to allow developers to make/add their own, such as how we did to our source. Bond used multi as a slot- he could use something like "user1", "user2", etc and allow for one or two textures per slot. Then the developer just needs to name the shader/texture file(s) according.


Twitter: @NFoxMedia
Pirate Myke
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 4th Aug 2012 20:06
Oh, I see. Then I will have to wait for the extra slots to be available in the sorce code.

Thanks for the explination.

maho76
12
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 17th Aug 2012 13:57
thanks, bond1, for this really nice fx.

Login to post a reply

Server time is: 2024-05-02 07:22:31
Your offset time is: 2024-05-02 07:22:31