본문으로 바로가기

illustration of life

현재위치 :: HOME BLOG CATEGORY SEARCH ARCHIVE TAGS MEDIA LOCATION GUESTBOOK

네비게이션

  • 홈
  • profile
  • write
  • facebook
  • Youtube
  • 태그
  • 방명록
  • Admin
관리자
  • 블로그 이미지
    illu_yun

    Technical Artist / All rights reserved by illu since 2001 / illustor@gmail.com

    링크추가
  • 글쓰기
  • 환경설정
  • 로그인
  • 로그아웃

Cbuffer padding for proper SRP Batcher capability

이거한번 정리해야지 했던건데 좀 늦게...SRP Batcher는 Unity의 Scriptable Render Pipeline (URP/HDRP 등)의 퍼포먼스 핵심 기능 중 하나로,GPU에 바인딩되는 셰이더/머티리얼/상수 버퍼를 효율적으로 처리하는 기능이다.요구되는 내용은 아래와 같다.Uniform Buffer Object (UBO) : 모든 Material 데이터를 UBO 구조로 압축해서 GPU에 보낸다.GLSL 구조화된 Layout 지원 : constant buffer layout이 정확하게 일치해야 GPU가 batch 처리 가능GPU에 std140 또는 std430 레이아웃 지원 : OpenGL ES 3.1부터 지원(WebGL 지원 불가)Unity documentation : https://docs..

Technical Report/Unity 2025. 5. 13. 17:49

stochastic tiling shader

/* hash code come from https://briansharpe.wordpress.com/2011/11/15/a-fast-and-simple-32bit-floating-point-hash-function/ https://iquilezles.org/www/articles/texturerepetition/texturerepetition.htm?fbclid=IwAR1DP44yF51aAJZCZizV1v1GfTDciW_XfOYokIxtybMmCWGeKcQn_v-Pxvo https://qiita.com/yuji_yasuhara/items/158bab01cfff3c39214b https://drive.google.com/file/d/1QecekuuyWgw68HU9tg6ENfrCTCVIjm6l/view *..

Technical Report/Unity 2022. 5. 29. 22:44

URP Realtime Shadow color control

URP에서는 Realtime casting으로는 Environment의 Realtime Shadow color 옵션이 작동하지 않는다. 이걸 조절할수 있게 바꾸는 방법은 Shader를 다 뜯어야 하는데.... Lighting.hlsl에는 아래와 같이 정의되어 있다. half3 SubtractDirectMainLightFromLightmap(Light mainLight, half3 normalWS, half3 bakedGI) { // Let's try to make realtime shadows work on a surface, which already contains // baked lighting and shadowing from the main sun light. // Summary: // 1) Ca..

Technical Report/Unity 2022. 1. 22. 03:22

URP BlinnPhong Default Character Shader

character shader base form based on mobile platform. 2021.1.6f1 support cascade. thanks for madumpa !!!. : blog posting below link. 캐스캐이드가 작동하지 않기 때문에 아래 링크처럼 픽셀에서 shadowcoord를 처리해주면 제대로 작동 https://blog.naver.com/PostView.naver?blogId=mnpshino&logNo=222154224409&navType=tl URP 셰이더 코딩 튜토리얼 A/S : 케스케이드 섀도우가 이상해요! 안녕하세요 마둠파입니다 전에 셰이더 코딩 튜토리얼 시리즈를 올려 뒀었는데요, 해당 셰이더로 케스케이드... blog.naver.com - support ..

Technical Report/Unity 2021. 7. 14. 18:22

URP Shader BlinnPhong with Normal mapping

URP Shader Training 중급에서 사용할 example. maskmap이랑 몇가지는 그냥 임의 커스텀(참고용). 이거저거 잡다하게 붙인... Shader "LightingExample/BlinnPhong" { Properties { [Header(URP BlinnPhong Lighting)] [Space(20)] _TintColor ("Tint Color", color) = (1,1,1,1) _BaseMap("Albedo(RGB)", 2D) = "white" {} [Normal]_BumpMap("Normal texture", 2D) = "white" {} _MaskMap("Occlusion(G), Glossness(A)", 2D) = "white" {} [Space(20)][Header(Con..

Technical Report/Unity 2021. 7. 8. 22:41

URP Shader coding guide Basic term

URP Shader Training에 사용된 문서. 기본 Opaque, Alphatest, Transparent 3종류의 셰이더 작성과 기본 응용을 포함하고 있다. 셰이더 기초 작성에 대한 가이드이지 이걸 실제 프로젝트에 사용하기에는 무리가 따른다. 공부를 처음 시작할때 어떻게 할지 모를때 첫발을 떼는데 도움을 주기 위한 목적이지 이걸 다룬다고 실제 프로젝트에 적용할 수 있는건 아니니 주의. URL : docs.google.com/document/d/1UX0319CXa29fCFAgg0qa5vnH-U6875jt0KLKUk5mke8/edit URP Shader Basic URP Shader Basic term 2 Shader란? 2 Basic simple basic code 2 Shader “shader f..

Technical Report/Unity 2021. 5. 1. 03:00

URP에서 TransparentObject mesh Depth pass에 쓰기

URP에서 Transparent shader는 depth texture에 기록되지 않는다. 셰이더에서 depth pass를 작성해도 안되는데 이는 렌더링 순서에 따른 문제이다. 일반적인 Transparent shader일때. 이때는 ZWrite를 On 시켜도 그려지지 않는것을 볼 수 있다. 렌더큐를 강제로 Geometry로 변경시키면 그려지는 것을 확인할 수 있으나 sorting에 문제가 생긴다. 이를 강제로 큐를 2450(AlphaTest 혹은 2470)으로 설정해서 쓰는 방법도 있긴 하지만 URP에서 사용되는 Render Feature를 활용 할 수도 있다. Opaque 이후 그려지도록 설정하고 Depth texture를 확인하면 제대로 그려지고 있는 것을 확인할 수 있다. 다만, URP Render..

Technical Report/Graphics Tech Reports 2021. 4. 22. 19:03

2D Signed Distance Field Basics

원문링크 : http://www.ronja-tutorials.com/post/034-2d-sdf-basics/ 원문 레거시 shader code를 URP용으로 바꿔서 정리한 내용. 기본 예제 코드. Shader "URPTraining/2Ddistance" { Properties { _TintColor("Test Color", color) = (1, 1, 1, 1) _Intensity("Range Sample", Range(0, 1)) = 0.5 _MainTex("Main Texture", 2D) = "white" {} } SubShader { Pass { Name "UniversalForward" Tags {"RenderPipeline"="UniversalForward" "RenderType"="Opaq..

Technical Report/Unity 2021. 2. 10. 19:08

200722 URP LookDev

URP Look Dev Test. Unity 2019.4 LTS, URP 7.3.1아직까지 공식 PP feature로 SSAO를 적용하지 않기 때문에 github의 GTAO를 써도 되겠지만 없는 상태에서도 tonemapping 만으로도 꽤 느낌이 난다. Post Processing 자체는 문제가 없는데 built-in bloom이 drawcall을 꽤 먹는다. 실기 사용에서는 커스텀이 필요할 듯.Bloom만 20개(setting에 따라서 더 늘어날 수 있다) Directional light intensity : 4Reflection probe intensity : 0.5(URP PBR을 커스텀을 해서 이부분은 좀 다듬을 필요가 있을듯) texture compression은 ASTC 6x6.

Diary/2020-2025 2020. 7. 22. 18:44

URP Default Unlit Based to Custom Lighting

Frame debugger에서는 call이 하나로 보이나 왼쪽에 보면 Draw calls가 4라고 표시되고 있다. SRP Batcher의 개념에 대한건 URP 문서에서 다시 설명을~Based on URP 7.1.8에서 제작하였으며, 이보다 낮은버젼에서는 동작을 보증하지 못합니다. Legacy vertex and fragement 코드에 익숙한 분들은 어렵지 않게 사용하실수 있을거고 fragment shader 코드에 익숙치 않은 분들은 아래에 //Lighting Calculate(Lambert) Light mainLight = GetMainLight(i.shadowCoord); float NdotL = satura..

Technical Report/Unity 2020. 1. 31. 19:02
  • 이전
  • 1
  • 다음

사이드바

NOTICE

  • Profile
  • 전체 보기
MORE+

CATEGORY

  • Life (1034)
    • Works (102)
      • 2D (32)
      • 3D (28)
      • Design (10)
      • official works 3D (32)
    • Scenes of Road (163)
      • Scene of Road (39)
      • Cats... and... (24)
      • Travel and People (41)
      • music and lylic (32)
      • about... something (27)
    • Sketch (134)
      • Dessin (19)
      • 2D Sketch (82)
      • 3D Sketch (14)
      • Travel and Sketch (19)
    • Technical Report (252)
      • Tutorials (36)
      • Unity (108)
      • Unreal (19)
      • Graphics Tech Reports (66)
      • Other things (12)
      • R&D test (10)
      • Global Reporting (1)
    • Diary (382)
      • 2020-2025 (21)
      • 2015-2019 (102)
      • 2014 (47)
      • 2013 (49)
      • 2012 (47)
      • 2011 (53)
      • 2010 (42)
      • 2008-2009 (21)

RECENTLY

  • 최근 글
  • 최근 댓글

최근 글

최근댓글

LINK

  • 대마왕님네
  • 오즈라엘
  • 대혁님네
  • woojin
  • 도훈형
  • 이장희(서울스케치)
  • 어떤 개발자의 금서목록
  • 흑기사의 방랑일지(shader)
  • Spikezang(Worldbuilder)
  • Chi Keen Hui
  • dandoombuggyart
  • Technical Effect
  • canny708
  • walll

VISITOR

오늘
어제
전체
  • 홈으로
  • 방명록
  • 로그인
  • 로그아웃
  • 맨위로
SKIN BY COPYCATZ COPYRIGHT illustration of life, ALL RIGHT RESERVED.
illustration of life
블로그 이미지 illu_yun 님의 블로그
MENU
  • 홈
  • profile
  • write
  • facebook
  • Youtube
  • 태그
  • 방명록
  • Admin
CATEGORY
  • Life (1034)
    • Works (102)
      • 2D (32)
      • 3D (28)
      • Design (10)
      • official works 3D (32)
    • Scenes of Road (163)
      • Scene of Road (39)
      • Cats... and... (24)
      • Travel and People (41)
      • music and lylic (32)
      • about... something (27)
    • Sketch (134)
      • Dessin (19)
      • 2D Sketch (82)
      • 3D Sketch (14)
      • Travel and Sketch (19)
    • Technical Report (252)
      • Tutorials (36)
      • Unity (108)
      • Unreal (19)
      • Graphics Tech Reports (66)
      • Other things (12)
      • R&D test (10)
      • Global Reporting (1)
    • Diary (382)
      • 2020-2025 (21)
      • 2015-2019 (102)
      • 2014 (47)
      • 2013 (49)
      • 2012 (47)
      • 2011 (53)
      • 2010 (42)
      • 2008-2009 (21)
VISITOR 오늘 / 전체
  • 글쓰기
  • 환경설정
  • 로그인
  • 로그아웃
  • 취소

검색

티스토리툴바