Code Monkey home page Code Monkey logo

cshade's Introduction

CShade

About

CShade is an HLSL shader collection for ReShade. CShade introduces conventional image and video processing effects from a different angle.

CShade also includes .fxh files that contain algorithms used in the collection or have potential use.

Effects

Inter-Shader Merging

CShade allows users to blend shaders together and configure shaders to output a combination of Red/Green/Blue/Alpha.

Adaptive Exposure

CShade features an adaptive-exposure shader that uses hardware blending for temporal smoothing. The shader also features spot-metering, allowing users to expose their image depending on an area.

Image Processing

CShade features shaders that deal with getting information about an image.

Video Processing

CShade features real-time motion estimation and feature-matching shaders through hierarchal Lucas-Kanade optical flow.

  • Adaptive autoexposure
  • Datamoshing
  • Motion blur approximation
  • Vector lines

Post Processing

CShade features shaders that filter images for aesthetics.

  • Backbuffer blending
  • Dual-Kawase bloom
  • Lens effect
  • Letterbox
  • Sharpening
  • Vignetting

Coding Convention

UI

  • In ui_category/ui_label, use | to separate between subcategories, if needed

    uniform float _Level1Weight <
        ui_category = "Bloom | Level Weights";
        ui_label = "Level 1";
        ui_type = "slider";
        ui_min = 0.0;
        ui_max = 1.0;
    > = 1.0;
  • In uniforms stored in .fxh header files, wrap [ ] around ui_category

    uniform float _CShadeExposureSmoothingSpeed <
        ui_category = "[ Pipeline | Output | AutoExposure ]";
        ui_label = "Smoothing Speed";
        ui_type = "slider";
        ui_min = 0.1;
        ui_max = 1.0;
    > = 0.25;

Functions and Variables

Shared Method From Header File

shared/common/cLib.fxh -> Common_CLib_FunctionName()

ALLCAPS

  • State parameters

    BlendOp = ADD

  • System semantics

    float4 SV_POSITION

ALL_CAPS

  • Preprocessor definition

    #define SHADER_VERSION

  • Preprocessor Macros

    #define EXAMPLE_MACRO()

  • Preprocessor Macro Arguments

    #define EXAMPLE_MACRO(EXAMPLE_ARG)

_SnakeCase

  • Uniform variables

    uniform float3 _Example

SnakeCase

  • Function arguments

    void Function(float4 ArgumentOne)

  • Global Variables

    static const float4 GlobalVariable = 1.0;
    void Function()
    {
        return GlobalVariable;
    }
  • Local Variables

    void Function()
    {
        float4 LocalVariable = 1.0;
        return LocalVariable;
    }
  • Textures and Samples

    texture2D ExampleTex ...

    sampler2D SampleExampleTex ...

SNAKE_Case

  • struct datatype

    struct APP2VS_Example ...

    struct VS2PS_Example ...

    struct PS2FB_Example ...

    struct PS2MRT_Example ...

  • VertexShader and PixelShader

    VertexShader = VS_Example;

    PixelShader = PS_Example;

Acknowledgments

cshade's People

Contributors

papadanku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

microdee

cshade's Issues

cCheckerBoard.fx help .

Hi could you please tell me what this shader does and how to activate it properly ? When I activate cCheckerBoard.fx everything becomes grey .

cOpticalFlow.fx instant ctd

Using latest version of reshade, start game or emulator bring up reshade UI and as soon as you click to enable cOpticalFlow.fx i get a instant crash to desktop with nothing in the log.

Folder structure issue

Since all shaders have been packed into cshade folder now, when downloading CShade effects through ReShade official installer, the effect files are placed under reshade-shaders/Shaders/CShade/cshade. It is okay for ReShade to load them with recursive searching, but I think this is kind of weird.

cDLAA.fx: error X3120

Describe the bug
cDLAA.fx compilation throws exception X3120.

To Reproduce
Steps to reproduce the behavior:

  1. Install ReShade with the CShade effect selected
  2. Start the application
  3. Let ReShade compile the installed effects
  4. See error

Screenshots
image

Information (please complete the following information):

  • Game: S.T.A.L.K.E.R. Anomaly
  • API: DX11 (AVX)
  • ReShade Version: 6.2.0

Additional context
Fresh installation, haven't touched anything in ReShade yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.