Author Topic: Soft shadows  (Read 85913 times)

Don't know if this has been mentioned yet, but you can easily load your own shaders via script without overwriting default files.

Code: [Select]
$Shader::Enabled = 1;
$Shader::ShaderName = "myShader"; //will need myShader_vert.glsl and myShader_frag.glsl in shaders folder
$Shader::ShadowCount = 4;         //how many shadow splits to use, valid range 1-4, scene is re-rendered for each split
$Shader::ShadowSize = 4096;       //shadow map texture size
$Shader::DynamicShadows0 = 1;     //render dynamic object shadows (vehicles, players, etc) at each shadow split
$Shader::DynamicShadows1 = 1;     //  example: setting DynamicShadows3 = 0 will turn off dynamic object shadows furthest away from the camera
$Shader::DynamicShadows2 = 1;     //  this can significantly improve performance in some cases
$Shader::DynamicShadows3 = 1;

//reinitialize shader stuff
initializeShaderAssets();
regenerateShadowMapFBOs();
flushVBOCache();

I haven't tested this but it's the way the default shaders work so it should be fine.  

Oh my god, really?
Thank you so much.

But yeah, how about this?

How do you specify the location of the shader files? Do they have to be in the shaders folder? In that case. you should allow us to write to it.

badspot
you have made me happy
thank you
so much oh my god badspot thank you
HAPPYNESS IS EXPLODDDDDDDDDDDDIIIIIINNNNGG GG
I hope you explode


dev release, for now

no, this is not an add-on
do not use this if you don't know what you're doing

also especially don't mess with these settings unless you know what you're doing

const float soft_distance = 0.05f;
const float soft_stepsize = 0.025f;


you can crash your game or get a framerate lower than 0.01 fps if you do it wrong

dev release, for now

no, this is not an add-on
do not use this if you don't know what you're doing
...finally


I don't understand this.. Who is worshiping Port? Unless someone is joking, I don't think anybody is doing that at all. People might be "worshiping" the shadows and how cool they look, but that's not the same thing as directly complimenting Port.

port i love you
port i love you
port i love you

On a serious note I think the actual difference between worshiping port and worshiping his shadows are irrelevant in this case.


Just tried it, looks pretty sweet and doesn't run too badly on max on my HD 7870, all I get is a lot of frame skipping

Anybody have an idea of how it would run on a 6850?

Anybody have an idea of how it would run on a 6850?
low fps, probably unplayable

low fps, probably unplayable
Even if it was at 720p rather than 1080p?

Any idea on how fast this'd be on 2 GeForce 450's in SLI? I'm already certain my G210 wouldn't stand a chance.

Lol how bout a gtx 560