mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
cfcf975794
error: Error compiling shader: 0(142) : error C1101: ambiguous overloaded function reference "log(int)" (0) : lowp float log(lowp float) (0) : mediump float log(mediump float) (0) : float log(float) error: device_pixelshader_create (GL) failed error: Pass (0) <> missing pixel shader! error: [StreamFX] <filter::color_grade> Error loading '/usr/local/share/obs/obs-plugins/StreamFX/effects/color-grade.effect': Unknown error during effect compile. error: [StreamFX] Unexpected exception in function '_create': Unknown error during effect compile.. error: Failed to create source 'Color Grading'!
82 lines
2.4 KiB
Text
82 lines
2.4 KiB
Text
// AUTOGENERATED COPYRIGHT HEADER START
|
|
// Copyright (C) 2021-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
|
// AUTOGENERATED COPYRIGHT HEADER END
|
|
|
|
//------------------------------------------------------------------------------
|
|
// HLSL/GLSL Support
|
|
//------------------------------------------------------------------------------
|
|
// OBS Studio does not correctly translate all HLSL functionality to GLSL.
|
|
|
|
// log10(x) is HLSL-exclusive and not translated by OBS Shader Parser.
|
|
#define m_log10(x) (log(x) / log(10.))
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Uniforms
|
|
//------------------------------------------------------------------------------
|
|
|
|
// View Projection Matrix
|
|
uniform float4x4 ViewProj;
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Samplers
|
|
//------------------------------------------------------------------------------
|
|
sampler_state BlankSampler {
|
|
};
|
|
|
|
sampler_state PointRepeatSampler {
|
|
Filter = Point;
|
|
AddressU = Repeat;
|
|
AddressV = Repeat;
|
|
};
|
|
|
|
sampler_state PointClampSampler {
|
|
Filter = Point;
|
|
AddressU = Clamp;
|
|
AddressV = Clamp;
|
|
};
|
|
|
|
sampler_state LinearRepeatSampler {
|
|
Filter = Linear;
|
|
AddressU = Repeat;
|
|
AddressV = Repeat;
|
|
};
|
|
|
|
sampler_state LinearClampSampler {
|
|
Filter = Linear;
|
|
AddressU = Clamp;
|
|
AddressV = Clamp;
|
|
};
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Structures
|
|
//------------------------------------------------------------------------------
|
|
struct VertexData {
|
|
float4 pos : POSITION;
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
struct VertexColorData {
|
|
float4 pos : POSITION;
|
|
float4 clr : COLOR;
|
|
float2 uv : TEXCOORD0;
|
|
};
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Vertex Shaders
|
|
//------------------------------------------------------------------------------
|
|
VertexData DefaultVertexShader(VertexData vtx) {
|
|
vtx.pos = mul(float4(vtx.pos.xyz, 1.0), ViewProj);
|
|
return vtx;
|
|
};
|
|
|
|
VertexColorData ColorVertexShader(VertexColorData vtx) {
|
|
vtx.pos = mul(float4(vtx.pos.xyz, 1.0), ViewProj);
|
|
return vtx;
|
|
};
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Color Conversion
|
|
//------------------------------------------------------------------------------
|
|
#include "color_conversion_rgb_yuv.effect"
|
|
#include "color_conversion_rgb_hsv.effect"
|
|
#include "color_conversion_rgb_hsl.effect"
|