Hot answers tagged

8

Neither of your suggestions is a solution for crisp 2D graphics at all resolutions. SVGs are great and infinitely scalable, but since you don't know where the pixel boundaries will lie in the final render, you can't get crisp edges at all resolutions. For example, say your GUI is a red box on a green background. If the edge between the red and the green ...


8

Using physically based BRDFs only makes sense if your entire pipeline is built for physical units - the extreme range of values can't be displayed properly without some form of tone mapping. You didn't include that part of the code but from the looks of it I'd say you're doing a simple clamp() followed by linear->sRGB conversion, which causes the bad ...


6

They represent the same operation, but Sample is what it's called in D3D10 and newer versions of HLSL, while tex2D is what it's called in D3D9 HLSL, and NVIDIA's (defunct) Cg language. By the way, the operation is also called texture in GLSL.


5

Yes, there's a better approach than using a screen recorder. You can capture frames directly inside Unity, using ScreenCapture.CaptureScreenshot. There's a choice of formats to save as, and you can use PNG so that, when you later assemble the frames into a video (using ffmpeg or another tool), you have full control over how much compression to use. This ...


4

There's quite a bit of information about this: Static/dynamic batching: basically combining objects into one super-object Atlas textures: combining textures into one large texture than only uses one material Switch to a deferred renderer if you are using many lights From my understanding to render an object that contains exceptional amount of vertices, ...


3

Both Unity's "Deferred shading rendering path" and "Legacy Deferred Lighting Rendering Path" work only for opaque surfaces. They both rely on a very similar set of passes: Render the opaque objects' lighting parameters to a number of render targets. This is referred to as the "G-Buffer pass" or "base pass". Lighting is then computed in screen-space using ...


2

Dielectric materials (which is what you get when metalness is 0) don't exhibit a mirror-like effect. Think of a sheet of smooth, non-transparent plastic. Real-life mirrors are panes of glass or transparent plastic covered with a thin layer of metal. Try a white base colour (1,1,1) and full metalness (1) instead. As Hubble pointed out in his comment, Unity ...


2

Maybe not the best solution but one that should work would be to multiply them by matrix like \begin{bmatrix}-1&0&0\\0&1&0\\0&0&-1\end{bmatrix} And multiply by this your mvp matrix to convert meshes vertices (this could be done offline). Quaternion can be change to matrix form, multiply and save as quaternion. You also need to ...


2

Here is an interesting answer from Styves on gamedev.net. Calculating bent normals is just an extension of AO calculation where the direction of each sample is also averaged along with the occlusion amount. The bent normals from substance painter seem correct. In any region that there is no AO, your normal won't be bent in any direction, ...


2

This is quite a broad topic, so I can only give a general overview. If you've never done any interactive animation before, this might be too big a challenge to start with, and maybe you should think of something smaller to do first. You first need to model and rig your character, or try to find an existing model online that's rigged with enough control over ...


1

It seems that sampler2D_float doesn't allow to interpolate shadow lookup linearly. So I had to do it by hand. Here's an example of interpolated shadowing. float texture2DCompare(sampler2D depths, vec2 uv, float compare){ float depth = texture2D(depths, uv).r; return step(compare, depth); } float texture2DShadowLerp(sampler2D depths, vec2 size, ...


1

I used Stencil Buffer to fixing your problem , you need a way for checking overlapping two or more shapes Shader "Custom/SemiTransparent" { Properties { _Color("Color",Color) = (0,0,1,0.1) } SubShader { Tags {"Queue"="Transparent" "IgnoreProjector"="true" "RenderType"="Transparent"} ZWrite Off Blend SrcAlpha OneMinusSrcAlpha ...


1

Generally, with VSYNC, your CPU is effectively doing nothing 99% of the time, as it merely sent the simple vertex buffer batch (few triangles, as you said) to the driver. If the shader is bandwidth-heavy, it takes multiple frames to render. In your case, you said it's 12 fps, e.g. 60/12 = 5 frames. So, the CPU (or the core that runs your thread), is ...


Only top voted, non community-wiki answers of a minimum length are eligible