GithubHelp home page GithubHelp logo

whichow / basicxshader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from midnightsuyama/basicxshader

0.0 0.0 0.0 4.75 MB

Unity Shader Code with “BASIC×SHADER”

C# 5.76% GLSL 17.93% ShaderLab 76.31%

basicxshader's Introduction

BASIC×SHADER

Unity Shader Code with “BASIC×SHADER

Frames

Getting Started

Unlit Shader

To set a shader to Unity object, assign through a material. Let's create object for display, material for the object, and shader for the material.

Object

Create a sphere object via GameObject > 3D Object > Sphere from the Unity Editor menu.

Object (Wireframe)

Material

Create a material file via Assets > Create > Material from the Unity Editor menu. Assign the material to the object.

Inspector (Object)

Shader

Create a shader file via Assets > Create > Shader > Unlit Shader from the Unity Editor menu. Replace the contents of shader with the code below and assign the shader to the material.

Inspector (Material)

Shader "BASICxSHADER/Unlit" {
  SubShader {
    Pass {
      CGPROGRAM
      #pragma vertex vert
      #pragma fragment frag

      float4 vert(float4 vertex : POSITION) : SV_POSITION {
        return UnityObjectToClipPos(vertex);
      }

      fixed4 frag() : SV_Target {
        return fixed4(1.0, 0, 0, 1.0);
      }
      ENDCG
    }
  }
}

#3 Lighting

#3.1 Ambient

Ambient

#3.2 Diffuse

Diffuse

#3.3 Specular

Specular

#3.4 Phong

Phong

#3.5 Blinn-Phong

Blinn-Phong

#3.6 Rim

Rim

#3.7 Toon

Toon

#3.8 Oren-Nayar

Oren-Nayar

#3.9 Cook-Torrance

Cook-Torrance

#3.10 SH

SH

#3.11 Point/Spot

Point/Spot

#4 Texturing

#4.1 Color

Color

#4.2 Gloss

Gloss

#4.3 Bump

Bump

#4.4 Parallax

Parallax

#4.5 Reflection

Reflection

#4.6 Refraction

Refraction

#5 Shadow

#5.1 Projection

Projection

#5.2 Volume

Volume

#5.3 Map

Map

#6 Fog

#6.1 Depth

Depth

#6.2 Distance

Distance

#6.3 Height

Height

#7 PostEffect

#7.1 Original

Original

#7.2 Negaposi

Negaposi

#7.3 Grayscale

Grayscale

#7.4 Sepia

Sepia

#7.5 Threshold

Threshold

#7.6 Mosaic

Mosaic

#7.7 LED

LED

#7.8 Noise

Noise

#7.9 Scanline

Scanline

#7.10 Twirl

Twirl

#7.11 Fisheye

Fisheye

#7.12 Sobel

Sobel

#7.13 Kuwahara

Kuwahara

#7.14 FXAA

FXAA

#7.15 ZoomBlur

ZoomBlur

#7.16 MotionBlur

MotionBlur

#7.17 GaussianBlur

GaussianBlur

#7.18 Bloom

Bloom

#7.19 DOF

DOF

#7.20 SSAO

SSAO

basicxshader's People

Contributors

midnightsuyama avatar

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.