Skip to content

Instantly share code, notes, and snippets.

View mazelines's full-sized avatar

jplee mazelines

View GitHub Profile
Shader /*ase_name*/ "Leegoonz/ASETemplateShaders/ParabolicMatcap" /*end*/
{
Properties
{
_FrontParaboloid ("_FrontParaboloid", 2D) = "white" { }
_RearParaboloid ("_RearParaboloid", 2D) = "white" { }
/*ase_props*/
}
SubShader
///////////////////////////////////////////////////////////////////////////////
// Lighting Functions //
///////////////////////////////////////////////////////////////////////////////
half3 LightingLambert(half3 lightColor, half3 lightDir, half3 normal)
{
half NdotL = saturate(dot(normal, lightDir));
#ifdef ENERGY_CONSERVED_DIFFUSE
return (1.0 / PI ) * lightColor * NdotL;
#else
return lightColor * NdotL;
Shader "URP_PBR_7.12"
{
Properties
{
[MainColor] _BaseColor("Albedo Color", Color) = (0.5,0.5,0.5,1)
[MainTexture] _BaseMap("Albedo", 2D) = "white" {}
_BumpMap("Normal Map", 2D) = "bump" {}
_BumpScale("Scale", Range(1,2)) = 1.0
_Smoothness("Roughness", Range(0.0, 1.0)) = 0.5
[Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 0.0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sbsbatchnode SYSTEM "glslfx.dtd">
<glslfx version="1.0.0" author="allegorithmic.com">
<!-- TECHNIQUES -->
<technique name="Parallax Occlusion">
<!-- PROPERTIES -->
<property name="blend_enabled" value="true"/>
<property name="blend_func" value="src_alpha,one_minus_src_alpha"/>
<property name="cull_face_enabled" value="true"/>
/*
Copyright (c) 2018, Allegorithmic. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
//fragment shader
//code start
//Sh.fsh
varying mediump vec3 EyespaceNormal;
varying mediump vec3 EyespaceLight;
varying lowp vec3 Diffuse;
varying lowp vec3 Irrad;
vertex shader.
//code start
//Spherical harmonic shader opengl es
//Sh.vsh
Shader "JP-PBR-BASE"
{
Properties
{
_Color("Main Color", Color) = (1,1,1,1)
_MainTex("Base Color", 2D) = "white" {}
_Roughness("Roughness",Range(0,1)) = 1
_NormalTex("Normal", 2D) = "bump" {}
_AmbientOcclusionTex("Occlusion",2D) = "white" {}
_Anisotropic("Anisotropic", Range(-20,1)) = 0
Shader "JP-PBR-BASE-EXPERIMENTAL"
{
Properties
{
_Color("Main Color", Color) = (1,1,1,1)
_MainTex("Base Color", 2D) = "white" {}
_Roughness("Roughness",Range(0,1)) = 1
_NormalTex("Normal", 2D) = "bump" {}
_Anisotropic("Anisotropic", Range(-20,1)) = 0
_Metallic("Metalness",Range(0,1)) = 0
half4 GammaToLinear(in half4 col)
{
#if SPACE_LINEAR
    return half4(col.rgb * col.rgb, col.a);
#else
    return col;
#endif
}
half4 LinearToGamma(in half4 col)