- 博客(25)
- 资源 (1)
- 收藏
- 关注
原创 photoshop学习
视频学习网址:https://www.bilibili.com/video/av4548006/?p=2快捷键:ctrl+0——将图片以画布尺寸显示在视图中
2019-04-30 15:53:25 733
原创 Toony Colors Pro 2项目分析——身体其他部位shader
分析目标:Toony Colors Pro 2/Examples/Cat Demo/UnityChan/Style 1项目地址:https://gitee.com/yichichunshui/ToonyColors.git首先是surf函数:void surf(Input IN, inout SurfaceOutputCustom o){ fixed4 mainTex = tex2D(_...
2019-04-30 14:19:00 1159
原创 unity shader中一些常用函数总结
参考网址:http://www.manew.com/forum.php?mod=viewthread&tid=97247&extra=page%3D2%26filter%3Dtypeid%26typeid%3D132蛮牛的专栏可以常看看:http://www.manew.com/forum-47-132-2.html第1个函数:step函数Shader "MyShader/...
2019-04-29 16:19:58 1481 1
原创 Toony Colors Pro 2项目分析——眼睛shader
本节我们开始分析shader代码。分析目标:Toony Colors Pro 2/Examples/Cat Demo/UnityChan/Style 1 Skinvoid surf(Input IN, inout SurfaceOutputCustom o){这是个表面着色器函数,直接处理的是像素,输入结构体为Input,定义如下:struct Input{ half2 uv_Ma...
2019-04-29 12:03:55 2398 4
原创 Toony Colors Pro 2项目分析——shader编辑器
项目package,可在官网购买,也可以在taobao购买。项目运行效果,可参看网址:http://www.jeanmoreno.com/unity/toonycolorspro/另外一个项目:https://github.com/unity3d-jp/unitychan-crs项目分析参看:https://blog.csdn.net/candycat1992/article/details...
2019-04-28 17:52:47 2189
原创 关于ramp texture的使用
参考网址:https://blog.csdn.net/tinyhum3d/article/details/44040447https://blog.csdn.net/candycat1992/article/details/17485631https://blog.csdn.net/huutu/article/details/50934670https://answers.unity.co...
2019-04-26 17:52:11 1280
原创 边缘光实现
参考网址:https://blog.csdn.net/poem_qianmo/article/details/51764028之前也写过这个文章,参考:https://blog.csdn.net/wodownload2/article/details/78934564https://blog.csdn.net/wodownload2/article/details/79213846一个是原...
2019-04-26 14:53:09 1071
原创 轮廓线——几何实现
本文主要是学习:https://assetstore.unity.com/packages/vfx/shaders/toon-shader-free-21288从unity asset store中可以下载资源,并且是免费的。里面的轮廓线是几何实现方法。下面就来自行实现下其中的代码。1、写一个shader,用来简单的采样贴图。Shader "MyShader/RoleBase"{ Pr...
2019-04-26 14:04:01 2688
原创 shader中toggle的使用
需求描述:在Inspector面板勾选按钮,起到开关作用。如勾选按钮,使用采样贴图;不勾选按钮则使用普通的颜色着色。代码实现:Shader "MyShader/ShaderToggle"{ Properties { [MaterialToggle(_TEX_ON)] _Toggle("Enable Main texture", Float) = 0 //1 _MainTex ...
2019-04-26 09:47:40 6991
原创 边缘检测 sobel算子
https://baike.baidu.com/item/一阶差分/3937421https://wenku.baidu.com/view/568fb133ee06eff9aef80748.html?sxts=1556172772761https://wenku.baidu.com/view/397f2605793e0912a21614791711cc7931b778e6.html?from=...
2019-04-25 14:38:31 869
原创 lua学习2
之前一节的lua环境的安装参考:https://blog.csdn.net/wodownload2/article/details/84062588本节学习内容:lua块首先学会的是命令行的交互方法:hello2.lua的内容:function cal(n) if n== 0 then return 1; else return n * cal(n-1); endend...
2019-04-25 10:14:34 155
原创 opencv环境搭建
参考网址:https://blog.csdn.net/duwangthefirst/article/details/79452314
2019-04-24 11:59:36 273
原创 NPR&卡通渲染
术语介绍:NPR——non photorealistic render. 即非真实感图形学。Cel-Shading 或者叫做 ToneBasedShading 即所谓的卡通渲染。学习曲线:https://blog.csdn.net/jvandc/article/details/81171250#npr卡通渲染轮廓线,勾边,描边图像的边缘可以指灰度不连续,或者亮度、深度、表面法线、表面反...
2019-04-24 10:55:46 3425 2
原创 无法打开包括文件"math.h"
今天又学会了一招。在学习软渲染的时候,首先找到了https://blog.csdn.net/puppet_master/article/details/80317178的文字,然后末尾有git开源代码,很舒服,有代码就是好办了。但是最苦恼的时候,C++的一堆包含目录设置。首先是找不到math.h文件,那么此时,要遍历c盘然后找到math.h的目录,可以发现是:C:\Program Fil...
2019-04-19 10:30:24 18192 2
原创 软渲染
https://blog.csdn.net/puppet_master/article/details/80317178 中有源码https://www.cnblogs.com/sdlwlxf/p/6540452.html 中有源码https://www.cnblogs.com/zhangbaochong/p/5751111.htmlhttps://www.davrous.com/2013/...
2019-04-19 09:34:55 341
原创 opengl中的矩阵和向量
如下代码:glm::mat4 sphereModel;sphereModel = glm::translate(sphereModel, glm::vec3(0, 0, -10.0f));输出:_cprintf("%f %f %f %f\n", sphereModel[0][0], sphereModel[1][0], sphereModel[2][0], sphereModel[3][0...
2019-04-18 14:16:40 1184
原创 斜视锥体投影矩阵推导
参考网址:https://gameinstitute.qq.com/community/detail/106203 翻译http://www.terathon.com/lengyel/Lengyel-Oblique.pdf 原文http://www.lsngo.net/2018/01/07/graphics_mirrorcamera_2/参考书籍:Mathematics.for.3D...
2019-04-02 17:39:33 1158 1
原创 平面方程
参考网址:http://www.lsngo.net/2018/01/07/graphics_plane/这里将点法式展开即可得到:所以上面式子中的D=-n点乘p,n是法向量,p为坐标点,都是三维的,注意负号。这句话又是什么意思?P=<n,D>,就是四维向量。任意一点的齐次坐标为(x,y,z,1),两个点乘,得到Ax+By+Cz+D=0,其实就是P点乘Q。所以平面可以...
2019-04-02 15:04:51 4882
原创 shader反射——平面反射
C#代码:using System.Collections;using System.Collections.Generic;using UnityEngine;public class PlanarReflection : MonoBehaviour{ private Camera reflectionCamera = null; private RenderText...
2019-04-01 20:17:11 4025
原创 ComputeScreenPos解释
inline float4 ComputeScreenPos(float4 pos) { float4 o = ComputeNonStereoScreenPos(pos);#if defined(UNITY_SINGLE_PASS_STEREO) o.xy = TransformStereoScreenSpaceTex(o.xy, pos.w);#endif retu...
2019-04-01 19:47:40 3732 5
原创 shader反射——立方体贴图
创建立方体贴图的工具代码:using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEditor;public class CubeMapTool : EditorWindow{ private Cubemap cubeMap = null; [M...
2019-04-01 17:19:51 448
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人