shader

Passing data through tessellation shaders to the fragment shader

一曲冷凌霜 提交于 2019-12-03 07:30:46
I'm a bit confused about how the shader pipeline works with regards to passing data through each stage. What I'm trying to do is pass color data that is loaded in the vertex stage using glVertexAttrib4fv() through the tessellation control shader, and then the tessellation evaluation shader, so that it can be used in the fragment shader. I'm not sure if I've made some sort of conceptual mistake (quite possible, since I'm still trying to get my head around this over fixed functions), but either way, as soon as I try and pass anything through the tessellation shaders, my primitives refuse to

Unity

十年热恋 提交于 2019-12-03 07:07:24
IDM下载器 百度网盘满速下载器(PanDownload) Visual Studio 2017正式版 v15.8.8 离线安装包 Unity官方正版下载 Beta版本 Releases版本 Patch版本 Unity破解版下载 百度网盘 提取码 9laq 天翼云盘 Unity官方资源(Asset Store) Unity2018离线文档下载 https://docs.unity3d.com https://docs.unity3d.com/uploads/UnityDocumentation.zip https://storage.googleapis.com/docscloudstorage/default/UnityDocumentation.zip Unity2017离线文档下载 https://docs.unity3d.com/2017.4/Documentation/Manual/ https://docs.unity3d.com/2017.4/Documentation/uploads/UnityDocumentation.zip https://storage.googleapis.com/docscloudstorage/2017.4/UnityDocumentation.zip Cg语言 http://developer.download.nvidia.com

Creator 2.2.0 终于等来了这款Shader组件神器!一招搞定Effect特效

风流意气都作罢 提交于 2019-12-03 07:00:43
先看下视频演示: ShaderHelper2支持Creator 2.2.0 视频录完后才想起,还没在微信小游戏中测试,赶紧试试,下面是在微信开发者工具中的截图。 径向模糊 探照灯 提供了一个ShaderMouse的组件,用于鼠标跟随 动态流光 动态雨滴 ShaderHelper2 特别版,仅支持CocosCreator 2.2.0 终于撸出来了!使用方法与Shader的移植方式可以参考下面几篇教程: 终于将 Shader 移植到 Cocos Creator 2.2.0 上了 ShaderHelper2 组件升级,支持自动枚举参数! 新版ShaderHelper,支持 Creator 2.1.2 ! ShaderHelper2正式回归,并全面使用TypeScript语言! 来源: https://www.cnblogs.com/creator-star/p/11781543.html

Unity 手机屏幕适配

夙愿已清 提交于 2019-12-03 06:34:46
////如有侵权 请联系我进行删除 email:YZFHKM@163.com 1、游戏屏幕适配 屏幕适配是为了让我们的项目能够跑在各种电子设备上(手机,平板,电脑) 那么了解是适配之前首先要了解两个知识点: 1-1、什么是像素? 单位面积中构成图像的点的个数。 特点:单位面积内的像素越多,分辨率越高,图像的效果就越好。 1-2、什么是分辨率? 分辨率可以从显示分辨率与图像分辨率两个方向来分类。 示分辨率(屏幕分辨率)是屏幕图像的精密度,是指显示器所能显示的像素有多少.分辨率的单位有:(dpi点每英寸)、lpi(线每英寸)和ppi(像素每英寸)。 特点: 图像的分辨率越高,所包含的像素就越多,图像就越清晰,印刷的质量也就越好。 同时,它也会增加文件占用的存储空间。 1-3、移动设备分辨率 –以iphone 为例 Paste_Image.png 2、什么是适配? 什么是适配? 适应、兼容各种不同的情况 游戏开发中,适配的常见种类 ¤系统适配 针对不同版本的操作系统进行适配,例如Unity3D 5.4系统 ¤屏幕适配 针对不同大小的屏幕尺寸进行适配,例如Iphone5s,iphone7 iPhone的尺寸 3.5inch、4.0inch、4.7inch、5.5inch iPad的尺寸 7.9inch、9.7inch 屏幕方向 竖屏 横屏 3、Unity3D 中的屏幕分辨 3-1.

GLSL: gl_FragCoord issues

孤人 提交于 2019-12-03 06:26:41
I am experimenting with GLSL for OpenGL ES 2.0. I have a quad and a texture I am rendering. I can successfully do it this way: //VERTEX SHADER attribute highp vec4 vertex; attribute mediump vec2 coord0; uniform mediump mat4 worldViewProjection; varying mediump vec2 tc0; void main() { // Transforming The Vertex gl_Position = worldViewProjection * vertex; // Passing The Texture Coordinate Of Texture Unit 0 To The Fragment Shader tc0 = vec2(coord0); } //FRAGMENT SHADER varying mediump vec2 tc0; uniform sampler2D my_color_texture; void main() { gl_FragColor = texture2D(my_color_texture, tc0); } So

What is the actual number of vertex uniform components for GLSL shader on ATI graphics card?

▼魔方 西西 提交于 2019-12-03 06:06:41
I'm writing a GLSL vertex shader for an iMac with a AMD Radeon HD 6970M 2048 MB graphics card: GL_MAX_VERTEX_ATTRIBS: 16 GL_MAX_VERTEX_UNIFORM_COMPONENTS: 4096 GL_VERSION: 2.1 ATI-7.12.9 GL_SHADING_LANGUAGE_VERSION: 1.20 In my shader I would like to have a large array of uniform mat4s: uniform mat4 T[65] but if I try to have 65 of these my shader (secretly) switches to Apple Software Renderer mode. If I instead use 64: uniform mat4 T[64] everything is fine. Seems to be a problem with exceeding the maximum number of uniforms. But as I wrote above I'm getting 4096 for GL_MAX_VERTEX_UNIFORM

Z-fighting solutions in depth test in OpenGL - how do they work?

佐手、 提交于 2019-12-03 06:02:47
Description I've had major problems with Z-Fighting in OpenGL and I've spent quite some time finding solutions for this problem. Some of the ones I've found and I understand and didn't like: Moving polygons away from each other ( like glPolygonOffset in OpenGL ) Dividing the scene according to Z coordinate and drawing parts of the scene with separate clean z-buffers. The ones I don't understand: Using Projection Matrix https://software.intel.com/en-us/articles/alternatives-to-using-z-bias-to-fix-z-fighting-issues Using "Logarithmic Depth Buffers" http://outerra.blogspot.com/2012/11/maximizing

What does the GL_ARRAY_BUFFER target mean in glBindBuffer?

我的未来我决定 提交于 2019-12-03 05:46:05
问题 I was confused about the VBO, glGenBuffers(1, &positionBufferObject); glBindBuffer(GL_ARRAY_BUFFER, positionBufferObject); Besides GL_ARRAY_BUFFER, there are other target types: GL_ATOMIC_COUNTER_BUFFER, GL_COPY_READ_BUFFER... However, the Opengl manual doesn't mention what these targets mean. I checked the glew.h: #define GL_ARRAY_BUFFER 0x8892 Does this mean the targets (like GL_ARRAY_BUFFER) are addresses? What does the target--GL_ARRAY_BUFFER mean in glBindBuffer? 回答1: In General Most

How does the default GLSL shaders look like? for version 330

末鹿安然 提交于 2019-12-03 05:40:19
问题 What do the default vertex, fragment and geometry GLSL shaders look like for version #330? I'll be using #version 330 GLSL Version 3.30 NVIDIA via Cg compiler, because that is what my graphics card supports. With default shaders, I mean shaders that do the same exact thing as the graphics card would do when the shader program is turned off. I can't find a good example for #version 330 . Been googling all day. Not sure if the term default shader is called something else like trivial or basic

How do I get the current color of a fragment?

百般思念 提交于 2019-12-03 05:34:19
问题 I'm trying to wrap my head around shaders in GLSL, and I've found some useful resources and tutorials, but I keep running into a wall for something that ought to be fundamental and trivial: how does my fragment shader retrieve the color of the current fragment? You set the final color by saying gl_FragColor = whatever , but apparently that's an output-only value. How do you get the original color of the input so you can perform calculations on it? That's got to be in a variable somewhere, but