Tag Info

Hot answers tagged

3

You might want to look into fur shading technique. This is what I would use for this type of grass, since the shorter the grass is the better the performance (less layers). Basically it works by layering the same surface multiple times in small increments: You can also change the horizontal offset to make the grass look bent.


3

It's probably multiplying the colours. That's pretty typical for a parameter like this. Each colour channel is interpreted as a value from 0 to 1, then multiplied with the corresponding colour channel of the tint colour. So: _______________ times red (1, 0, 0) = white (1, 1, 1) = red (1, 0, 0) grey (0.5, 0.5, 0.5) = ...


2

DXGI_FORMAT_R32G32B32_FLOAT is not 16 bytes, that's the first problem after a quick look. Either declare it 12 in your layout or specify D3D11_APPEND_ALIGNED_ELEMENT instead. Or Make it DXGI_FORMAT_R32G32B32A32_FLOAT instead depending on your matrix.


2

If you open the image above in its full resolution and look closely (with something like Magnifier on Windows), you should see that all the pixels simply have something like a blurred edge. Since there can be seen standalone "edges" of pixels, it is clearly not a post-processing method. When looking at screenshots in different resolutions, the edge ...


1

No, that's not how shaders work. If you want to use a shader to manipulate a texture, you need to set up a render-to-texture operation. Create a result texture, bind it as the render target, bind your input texture as a regular input texture, and bind the shader you want to execute "once." Render a fullscreen quad mapped with the input texture using the ...


1

You can use CheckDeviceFormat to determine if a given D3DFORMAT is suitable for the device's backbuffer; it's unlikely that particular format will be. Instead, try creating the device with any old acceptable backbuffer format (D3DFMT_X8R8G8B8 for example); it doesn't matter since you won't be rendering to it. Then create a new texture with the desired ...


1

I solved it! Here is the process I followed: Render Lower Tiled Map Layers Render Entities Render Upper Tiled Map Layers Render Upper Tiled Map Layers to stencil buffer Render Entities using the stencil buffer with a simple color fragment shader The code. Rendering the upper map layer: // Render the top map layer normally renderer.render(layerIndeces); ...


1

You need to check two things: 1.Texture and Shader ETC1 doesn't support alpha. You'd have to use a separate texture read (which you seem to be doing on texture2D(CC_Texture1, v_texCoord2). You can use tools to extract alpha channel from a RGBA texture and use a single texCoord for both samplers. Your code could be something like this: vec3 tex = ...



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