Skip to content

Instantly share code, notes, and snippets.

View HiromichiYamada's full-sized avatar

Hiromichi Yamada HiromichiYamada

View GitHub Profile
@HiromichiYamada
HiromichiYamada / Unlit-CastShadow.shader
Created June 17, 2021 14:17 — forked from pigeon6/Unlit-CastShadow.shader
Unlit texture shader which casts shadow on Forward/Defered
// Unlit texture shader which casts shadow on Forward/Defered
Shader "Unlit/Texture CastShadow" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Geometry" }
LOD 100
// add child view
UIViewController* controller = [self.storyboard instantiateViewControllerWithIdentifier:@"test"];
[self addChildViewController:controller];
controller.view.frame = CGRectMake(0, 44, 320, 320);
[self.view addSubview:controller.view];
[controller didMoveToParentViewController:self];
// remove child view
UIViewController *vc = [self.childViewControllers lastObject];
[vc.view removeFromSuperview];
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]];
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];