# obs-shaderfilter 1.21
## Introduction
The obs-shaderfilter plugin for [OBS Studio](http://obsproject.com/) is intended to allow users to apply
their own shaders to OBS sources. This theoretically makes possible some simple effects like drop shadows
that can be implemented strictly in shader code.
Please note that this plugin may expose a reasonable number of bugs in OBS, as it uses the shader parser and
the property system in somewhat unusual ways. It should be considered to be in a prerelease state at this time.
## Installation
The binary package mirrors the structure of the OBS Studio installation directory, so you should be able to
just drop its contents alongside an OBS Studio install (usually at C:\Program Files (x86)\obs-studio\). The
necessary files should look like this:
obs-studio
|---data
| |---obs-plugins
| |---obs-shaderfilter
| |---examples
| |---blink.shader
| |---border.shader
| |---drop_shadow.shader
| |---filter-template.effect
| |---multiply.shader
| |---pulse.effect
| |---rectangular_drop_shadow.shader
| |---rounded_rect.shader
| |---many more...
| |---locale
| |---en-US.ini
|---obs-plugins
|---32bit
| |---obs-shaderfilter.dll
|---64bit
|---obs-shaderfilter.dll
## Usage
The filter can be added to any source through the "Filters" option when right-clicking on a source. The name
of the filter is "User-defined shader."
Shaders can either be entered directly in a text box in the filter properties, or loaded from a file. To change
between the two modes, use the "Load shader text from file" toggle. If you are entering your shader text directly,
note that you will need to use the "Reload effect" button to apply your changes. This can also be used to reload an external file if changes have been made. OBS shaders are written in HLSL.
The option is provided to render extra pixels on each side of the source. This is useful for effects like shadows
that need to render outside the bounds of the original source.
Normally, all that's required for OBS purposes is a pixel shader, so the plugin will wrap your shader text with a
standard template to add a basic vertex shader and other boilerplate. If you wish to customize the vertex shader
or other parts of the effect for some reason, you can check the "Use Effect File (.effect)" option.
Any parameters you add to your shader (defined as `uniform` variables) will be detected by the plugin and exposed
in the properties window to have their values set. Currently, only `int`, `float`, `bool`, `string`, `texture2d`, and `float4`
parameters are supported. (`float4` parameters will be interpreted by the properties window as colors.) `string` is used for
notes and instructions, but could be used in an effect or shader. Variable names are displayed in the GUI with underscore replaced with space `uniform float Variable_Name` becomes `Variable Name`.
#### Defaults
You set default values as a normal assignment ```uniform string notes = 'my note';```, except for `float4`
which requires bracket \{\} notation like ```uniform float4 mycolor = { 0.75, 0.75, 0.75, 1.0};```
Note that if your shader has syntax errors and fails to compile, OBS does not provide any error messages; you will
simply see your source render nothing at all. In many cases the output of the effect parser will be written to the
OBS log file, which you can view with the Help -> Log Files menu in OBS.
### Standard parameters
The plugin automatically populates a few parameters which your shader can use. If you choose to override the entire
effect, be sure to define these as `uniform` variables and use them where necessary. (The filter should gracefully
handle these variables being missing, but the shader may malfunction.)
* **`ViewProj`** (`float4x4`)—The view/projection matrix. (Standard for all OBS filters.)
* **`image`** (`texture2d`)—The image to which the filter is being applied, either the original output of
the source or the output of the previous filter in the chain. (Standard for all OBS filters.)
* **`elapsed_time`** (`float`)—The time in seconds which has elapsed since the filter was created. Useful for
creating animations.
* **`local_time`** (`float`)— a random float representing the local time.(1.2)
* **`loops`** (`int`)— count of how many loops times the shader has rendered a page.(1.2)
* **`rand_f`** (`float`)— a random float between 0 and 1. changes per frame.
* **`rand_activation_f`** (`float`)— a random float between 0 and 1. changes per activation, load or change of settings.(1.2)
* **`rand_instance_f`** (`float`)— a random float between 0 and 1. changes per instance on load.(1.2)
* **`uv_offset`** (`float2`)—The offset which should be applied to the UV coordinates of the vertices. This is
used in the standard vertex shader to draw extra pixels on the borders of the source.
* **`uv_scale`** (`float2`)—The scale which should be applied to the UV coordinates of the vertices. This is
used in the standard vertex shader to draw extra pixels on the borders of the source.
* **`uv_size`** (`float2`)—The height and width of the screen.
* **`uv_pixel_interval`** (`float2`)—This is the size in UV coordinates of an individual texel. You can use
this to convert the UV coordinates of the pixel being processed to the coordinates of that texel in the source
texture, or otherwise scale UV coordinate distances into texel distances.
### New Options in version 1.1+
* **`Use Slider Inputs`**— Converts Integer and floating point inputs into sliders in the UI.
* **`Use Shader Time`**—Start the effect from the loadtime of the shader, not the start up time of OBS Studio.
* **`Override Entire Effect`** renamed **`Use Effect File (.effect)`** in UI and documentation
* Textures moved from the shaders folder to the textures folder. Existing textures are not deleted so as to not disrupt you current scenes.(1.2)
* 1.21 minor bug fixes and shader/effect updates
### Example shaders
Several examples are provided in the plugin's *data/examples* folder. These can be used as-is for some hopefully
useful common tasks, or used as a reference in developing your own shaders. Note that the *.shader* and *.effect*
extensions are for clarity only, and have no specific meaning to the plugin. Text files with any extension can be
loaded. In a standard, *.effect* files include a vertex shader and *.shader* only has a pixel shader.
I recommend *.shader* as they do not require `Use Effect File (.effect)` as pixel shaders, while *.effect* signifies vertex shaders with `Use Effect File (.effect)` required.
* *animated_texture.effect*— Animates a texture with polar sizing and color options
* *ascii.shader*— a little example of ascii art
* *background_removal.effect*— simple implementation of background removal. Optional color space corrections
* *blink.shader*—A shader that fades the opacity of the output in and out over time, with a configurable speed
multiplier. Demonstrates the user of the `elapsed_time` parameter.
* *bloom.shader / glow.shader*— simple shaders to add glow or bloom effects, the glow shader has some additional options for animation
* *cartoon.effect* (Use Effect File (.effect))— Simple Cartooning based on hue and steps of detail value.
* *border.shader*—A shader that adds a solid border to all extra pixels outside the bounds of the input.
* *drop_shadow.shader*—A shader that adds a basic drop shadow to the input. Note that this is done with a simple
uniform blur, so it won't look quite a
没有合适的资源?快使用搜索试试~ 我知道了~
obs-shaderfilter-win (1)_OBS_SHADER_
共113个文件
shader:50个
png:32个
effect:22个
5星 · 超过95%的资源 4 下载量 146 浏览量
2021-09-30
01:17:10
上传
评论
收藏 3.84MB ZIP 举报
温馨提示
OBS file to use on OBS plugins
资源详情
资源评论
资源推荐
收起资源包目录
obs-shaderfilter-win (1)_OBS_SHADER_ (113个子文件)
obs-shaderfilter.dll 49KB
obs-shaderfilter.dll 39KB
blend.effect 12KB
fire-3.effect 11KB
embers.effect 9KB
luma-burn.effect 9KB
animated_texture.effect 4KB
gaussian-example.effect 4KB
matrix.effect 4KB
gaussian-blur.effect 4KB
background_removal.effect 3KB
glitch_analog.effect 3KB
rotatoe.effect 3KB
shake.effect 3KB
two-pass-drop-shadow.effect 3KB
cartoon.effect 2KB
pixelation.effect 2KB
template.effect 2KB
doodle.effect 2KB
luminance_alpha.effect 2KB
repeat_texture.effect 2KB
filter_template.effect 1KB
pulse.effect 1KB
repeat.effect 1KB
en-US.ini 3KB
en-US.ini 729B
wipes.json 2KB
LICENSE 1KB
README.md 16KB
obs-shaderfilter.pdb 532KB
obs-shaderfilter.pdb 484KB
Rainbow-c.png 305KB
Rainbow-b.png 302KB
Rainbow.png 275KB
Rainbow2.png 268KB
Rainbow-a.png 229KB
Rainbow-a2.png 215KB
TileableLinearShadowMask.png 214KB
TileableLinearShadowMaskEDP.png 202KB
TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacing.png 199KB
TileableLinearApertureGrille15Wide8And5d5Spacing.png 194KB
matrix.png 135KB
derez-parallel-zigzag-h-sm.png 129KB
SeeSurn.png 111KB
Godzilla_1.png 111KB
transporter.png 111KB
Godzilla_2.png 111KB
canvas.png 88KB
derez-top.png 77KB
ryzen-h.png 71KB
hearts-v.png 64KB
derez-parallel-zigzag-h-lg.png 61KB
logo-h.png 48KB
logo-v.png 46KB
derez-zigzag-h.png 31KB
giraffe.png 7KB
TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacingResizeTo64.png 7KB
TileableLinearShadowMaskResizeTo64.png 6KB
TileableLinearShadowMaskEDPResizeTo64.png 5KB
TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png 4KB
blank.png 3KB
burngradient.png 625B
burngradient_small.png 176B
fire.shader 7KB
night_sky.shader 7KB
perlin_noise.shader 6KB
gradient.shader 5KB
burn.shader 5KB
shine.shader 5KB
simplex_noise.shader 4KB
drunk.shader 4KB
divide_rotate_ convert.shader 3KB
simple_gradient.shader 3KB
rounded_stroke.shader 3KB
glitch_analog.shader 3KB
rainbow.shader 3KB
scan_line.shader 3KB
edge_detection.shader 3KB
ascii.shader 3KB
selective_color.shader 3KB
VHS.shader 2KB
gaussian-simple.shader 2KB
zoom_blur.shader 2KB
hexagon.shader 2KB
divide_rotate.shader 2KB
rgb_color_wheel.shader 2KB
color_grade_filter.shader 2KB
glow.shader 2KB
aspect_ratio.shader 2KB
blend_opacity.shader 2KB
cell_shaded.shader 2KB
bloom.shader 2KB
glass.shader 2KB
drop_shadow.shader 1KB
luminance2.shader 1KB
filter_template.shader 1KB
rectangular_drop_shadow.shader 1KB
frosted_glass.shader 1KB
luminance.shader 1KB
rounded_rect.shader 1KB
共 113 条
- 1
- 2
Dyingalive
- 粉丝: 88
- 资源: 4808
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1