[학원 Unity] 22

그래픽스) 시험 내용 정리

1) 찌그러지는 정도 조절하기이동속도잔상안보이기 Shader "Custom/Fire"{ // 인터페이스 Properties { _FireTex ("Fire Texture 2D", 2D) = "white" {} // 첫번째 이미지 _NoiseTex ("Noise Texture 2D", 2D) = "white" {} // 두번째 이미지 _AnimeSpeed("Anime Speed", Range(0.1, 1)) = 1 // 이미지 재생 속도 _ImageCrushed("Image Crushed", Range(0.1, 1)) = 0.5 // 구겨지는 이미지 값 조절 } SubShader { Tags { "Re..

09-03 ) 버텍스 컬러

시작전 해당 패키지(Polybrush) 다운윈도우 - 패키지매니저 에서 다운 가능 다운 완료하면 툴에 브러쉬가 생긴다 도구 이용해 아래 이미지 대로 그려보기5. 버텍스 컬러 Shader "Custom/VertexColor"{ Properties { _Texture1 ("Texture 1", 2D) = "white" {} _Texture2 ("Texture 2", 2D) = "white" {} _Texture3 ("Texture 3", 2D) = "white" {} _Texture4 ("Texture 4", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } ..

09-02 수업내용 쉐이더 랜더링

1.  랜더링Shader "LearnShader/Test/MyShader"{ Properties { // Properties 안에선 ; 을 사용하면 안된다. _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} // 여기선 log를 확인할 방법이 없어 인게임에서 결과로 색을 확인해야한다. // 변수명(디스플레이 이름, 변수의 타입) = 기본값 _Darkness ("Darkness", Float)=0.1 _Brightness ("Brightness", Range(0.0, 1.0)) = 1 // Float4를 받..

스위치 버튼 만들기

클릭을 하면 on, off하는 스위치 버튼을 만들어보자 UISwitchBtn  게임오브젝트 순서 참고 메인UISwitchBtn에 스크립트 추가using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;public class UISwitchButton : MonoBehaviour{ public enum eState { None = -1, Off = 0, On = 1 } private Button btn; public GameObject[] offOn; // 0:off, 1: on // enum 상태를 저장한 변수 pr..