Merging Code - Custom Shaders

Author Topic: Merging Code - Custom Shaders  (Read 11766 times)

or atleast not have to modify the current shaders to get custom shaders. :)
this would be nice.

This little bit here:
const int numlights = 8;
Should change the max number of lights you can see in-game.

It seems like the limit isn't 8 in v21 with unmodified shaders, though.

Odd cause the code in there only calculates 8.

someone should get Screen Space Ambient Occlusion (SSAO) going :)

I want people to release shaders :(

Someone make a support system that injects user shaders into files each startup.

That DOF shader may look cool in Blockland.

That DOF shader may look cool in Blockland.
Making a good DoF shader is impossible unless Badspot adds post processing.

Someone make a support system that injects user shaders into files each startup.

Sort of like how Scars did, but dynamic? You'd be better at it than any of us.

Making a good DoF shader is impossible unless Badspot adds post processing.

Aren't shaders essentially just a form of post processing? I don't see why it wouldn't be possible.

Aren't shaders essentially just a form of post processing? I don't see why it wouldn't be possible.
yes
Sort of like how Scars did, but dynamic? You'd be better at it than any of us.
Shaders don't work for me yet, so I can't test it. But I think it's a good idea to have a consistent and well-adopted custom shader system before people go around having all these annoying edits that overwrite others (we can make it so they're injected automatically, with certain snippets being allowed to be inserted at different places). Maybe have something like shaders.txt with something like this:

Code: [Select]
VERT_MAIN main.glsl
VERT blah.glsl

Where blah.glsl is code that is injected at the global level and main.glsl is code that is injected into the entry point and calls any methods defined in blah.glsl. I don't know whether Badspot would like this, though.

What I'd really want is a default system where the server registers shaderData datablocks which clients download while loading. Then later, the server can use %client.pushShader( datablock ); and %client.popShader( datablock ); for enabling and disabling a specific shader for individual clients. A way for clients to set up their own extra shaders without relying on the server would be great as well. In any case, if something like this is going to happen, we're going to have to wait a bit.

Badspot wouldn't make a way to force shaders on people who might not even support it, but I believe at one point it was confirmed we could make our own custom shaders - the thing is, shaders are still in testing, so the system isn't there yet (or at least fully functional).

yesShaders don't work for me yet, so I can't test it. But I think it's a good idea to have a consistent and well-adopted custom shader system before people go around having all these annoying edits that overwrite others (we can make it so they're injected automatically, with certain snippets being allowed to be inserted at different places). Maybe have something like shaders.txt with something like this:

Code: [Select]
VERT_MAIN main.glsl
VERT blah.glsl

Where blah.glsl is code that is inserted at the global level and main.glsl is code that is inserted into the entry point and calls any methods defined in blah.glsl. I don't know whether Badspot would like this, though.
Maybe there could be files in the shaders/custom directory. An addon would loop through all the files in that directory and inject the shader code that's in the file. Here's an example.
Code: [Select]
renderCsm_frag.glsl
line of code
custom shader code
-
line of code 2
more custom shader code
etc.
custom shader code would be inserted into renderCsm_frag.glsl right after the line "line of code" and - would be used to seperate the different parts of your code if it isn't all bunched together in one place.
« Last Edit: August 29, 2012, 06:40:32 PM by Scars75 »

Badspot wouldn't make a way to force shaders on people who might not even support it, but I believe at one point it was confirmed we could make our own custom shaders - the thing is, shaders are still in testing, so the system isn't there yet (or at least fully functional).
All I remember being confirmed is that the shader source would be available.

A support script that allows anyone to inject lines or blocks of code into the shader would be disastrous unless you added a compatibility check system, which in my opinion would not be worth it. The alternative would be a script that replaces the whole shader file, but it would only allows one custom shader at a time.