Tag Info

Hot answers tagged

6

It's easy to produce an effect like this in a pixel shader, using threshold animation. The idea is that you have a monochrome texture and apply a threshold value to it; wherever the texture is lower than the threshold, the material is colored, and where the texture is higher than the threshold the material is blank. You animate the threshold value from 0 ...


3

Ok, finally figured it out! You see how the sphere mesh “cuts” through the cylinder and plane all the way to the skybox. This took me longer than expected to figure this out but thanks to a wiki page (http://wiki.unity3d.com/index.php/DepthMask) I got it all sorted. Before using the shader setup in the wiki page I was using three different cameras with ...


2

The most robust way to do this is probably to split your geometry into two separate draw calls, one with depth testing and one without. That said, if you want to do it in one batch... 1) If the depth override is set on a per-vertex level, you can do something like this in your vertex shader: output.position = mul(worldViewProjectionMatrix, ...


2

Couple of options to get the effect you want - but they do come a a cost: Write the holes into the stencil buffer or destination alpha channel, then draw the skybox last, using a suitable stencil test or alpha blend, and with no z-test? or Render the skybox to a texture at the start of the frame, and project that on to the 'hole geometry' I suspect ...


2

This is going to depend on what you want to work with. Blender has an export feature which will allow you to export the models into several formats. If you want to write a customer parser, there are a few for various formats. You mentioned WebGL, which makes me think you're going to be working with JavaScript. With this in mind, Three.JS has some built in ...


2

No, there is no restriction to mixing up use shader stages. The crash is being caused either by something specific you're doing incorrectly or a driver bug. Turn on the debug layer or trying using the WARP driver when setting up your D3D context. You can also try running under a graphics debugger; NVIDIA, AMD, and Intel have hardware-specific tools and ...


1

One way of doing this is using min blending. With Unity this can be set up in ShaderLab using the BlendOp command. If your objects are all monochrome as seen here, you may simply be able to use min blending directly on the objects as they're rendered and avoid having an alpha channel at all. (White is transparent when using min blending.) Min blending ...


1

I was thinking wrong. I do not more passes to receive every light in the scene. I took a shortcut and used a surface shader in the end. I post it here for reference Shader "Custom/Test01" { Properties { _MainTex ("Texture (RGBA)", 2D) = "white" {} } SubShader { Tags { "Queue" = "Transparent" ...


1

The way I usually handle constant buffers is to define a struct in C++ that matches the layout of the constant buffer as defined in HLSL; then I can just create an instance of the struct and fill in the data. You can also create a more data-driven system where you use the offset and size information retrieved from shader reflection. You'll need to allocate ...



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