Skip to content

Instantly share code, notes, and snippets.

View Dandarawy's full-sized avatar

Abdullah Badawy Dandarawy

View GitHub Profile
@Dandarawy
Dandarawy / LitInput.hlsl
Last active September 17, 2020 10:57
Unity URP shader based gamma correction (Step 1.1)
inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfaceData)
{
#if UNITY_COLORSPACE_GAMMA
half gamma =2.2;
#endif
half4 albedoAlpha = SampleAlbedoAlpha(uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap));
outSurfaceData.alpha = Alpha(albedoAlpha.a, _BaseColor, _Cutoff);
half4 specGloss = SampleMetallicSpecGloss(uv, albedoAlpha.a);
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class DynamicPapersUpdater : MonoBehaviour {
public GameObject FrontPagePrefab;
public GameObject BackPagePrefab;
public BookPro book;
// Use this for initialization