Compare commits
No commits in common. "3b12a88a76039e9761add05af2805931f4468ba6" and "8d26a45d92b37d317dbc9925be02d8dd5a49c83b" have entirely different histories.
3b12a88a76
...
8d26a45d92
4 changed files with 4 additions and 40 deletions
|
@ -1,7 +1,5 @@
|
|||
#version 120
|
||||
|
||||
#define pixelSize 2 // the size of pixels [1 2 4 8 16]
|
||||
|
||||
#define dithering // whether or not to apply dithering
|
||||
#define colorMode 0 // hsv/rgb [0 1]
|
||||
|
||||
|
@ -11,14 +9,14 @@
|
|||
|
||||
#define rgbSteps 4 // the number of rgb values to use [2 4 8 16 32 64]
|
||||
|
||||
#define pixelSize 2 // the size of pixels [1 2 4 8 16]
|
||||
|
||||
uniform sampler2D gcolor;
|
||||
uniform sampler2D colortex1;
|
||||
uniform float viewWidth, viewHeight;
|
||||
|
||||
varying vec2 texcoord;
|
||||
|
||||
#include "/module/dof.frag"
|
||||
|
||||
// All components are in the range [0…1], including hue.
|
||||
vec3 rgb2hsv(vec3 c)
|
||||
{
|
||||
|
@ -118,9 +116,7 @@ float dither(float color, float dithersteps) {
|
|||
void main() {
|
||||
// adjust texture coordinate based on pixel size if needed
|
||||
vec2 newcoord = texcoord;
|
||||
#ifdef dof
|
||||
newcoord = depthOfField();
|
||||
#elif pixelSize > 1
|
||||
#if pixelSize > 1
|
||||
vec2 view = vec2(viewWidth, viewHeight) / float(pixelSize);
|
||||
float offset = (ceil(pixelSize * 0.5) - 0.5) / float(pixelSize);
|
||||
newcoord = (floor(newcoord * view) + offset) / view;
|
||||
|
|
|
@ -35,13 +35,3 @@ value.vWarp.32=Silly (32x)
|
|||
option.tWarp=Texture Warping
|
||||
option.tWarp.comment=Emulates affine texture mapping responsible for warping textures on the PSX
|
||||
|
||||
screen.FX=FX
|
||||
option.dof=Depth of Field
|
||||
option.dof.comment=Downscale out-of-focus objects
|
||||
option.worldCurvature=World Curvature
|
||||
value.worldCurvature.0=Off
|
||||
value.worldCurvature.1=Chunk
|
||||
value.worldCurvature.2=Cylinder
|
||||
value.worldCurvature.3=Polyhedron
|
||||
value.worldCurvature.4=Sphere
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
//#define dof
|
||||
|
||||
uniform float centerDepthSmooth;
|
||||
uniform sampler2D depthtex1;
|
||||
|
||||
const float centerDepthSmoothHalfLife = 16f;
|
||||
|
||||
vec2 depthOfField() {
|
||||
float depth = texture2D(depthtex1, texcoord).x;
|
||||
float distance = depth - centerDepthSmooth;
|
||||
int stops = min(int(distance * 96), 5);
|
||||
|
||||
float virtualSize = pow(float(pixelSize), 1 + stops);//1 + stops);
|
||||
vec2 view = vec2(viewWidth, viewHeight) / virtualSize;
|
||||
float offset = (ceil(virtualSize * 0.5) - 0.5) / virtualSize;
|
||||
return (floor(texcoord * view) + offset) / view;
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ profile.VR32=pixelSize=8 colorMode=0 !dithering hueSteps=2 satSteps=2 valSteps=2
|
|||
|
||||
# -- SCREENS --
|
||||
# default
|
||||
screen=<profile> <empty> pixelSize <empty> [COLOR] [PSX] [FX]
|
||||
screen=<profile> <empty> pixelSize <empty> [COLOR] [PSX]
|
||||
|
||||
# colors
|
||||
screen.COLOR.columns=3
|
||||
|
@ -18,9 +18,6 @@ screen.COLOR=colorMode dithering <empty> rgbSteps <empty> <empty> hueSteps satSt
|
|||
# psx
|
||||
screen.PSX=vWarp tWarp
|
||||
|
||||
# fx
|
||||
screen.FX=dof worldCurvature
|
||||
|
||||
# -- CONDITIONALS --
|
||||
gbuffers_hand.enabled=tWarp
|
||||
|
||||
|
|
Loading…
Reference in a new issue