Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

8338 Excellent

About unbird

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. SV_Positions with w=0 sounds bad, it likely gets clipped. Try v[0].Position = float4(-0.5, -0.5, 0.5, 1.0); etc. instead.
  2. We don't, but here it's set so deliberately to use bilinear filtering for downsampling. Aside: You can use the API to do this, though you won't have control of the filtering: ID3D11DeviceContext::GenerateMips (note the mandatory creation flags for the texture) .
  3. unbird

    Fragment Shader played in Reverse

    Indeed, this particular effect could be very hard to model. You could get away with something similar/cheaper though. E.g. playing with analytic waves and sampling multiple times, or using mipmaps https://www.shadertoy.com/view/MtfyDN
  4. I wonder if that was made procedurally or even particles. Could be "simple" polar texture mapping, animate the tex coord, use a wrapping/tiling texture and blend ... somehow. To really know, we'd need the source of that game. You should tell what you got at your disposal (language, graphics API or engine), since if you want to go procedural you'd need pixel shader access or something, as irreversible shows. As for procedural: It can be as complex as you want. I recommend a look at shadertoy. Here some examples which I think do something you're after or at least serve as a starting point. Eclipse1 Eclipse2 (PS: I searched shadertoy with the key words plasma, halo, radial, circular and polar. Visually though the best results came back with "eclipse" ) Edit: Here a bare example of what I had in mind above: PolarMappingAnimation . Should have mentioned earler: shadertoy needs WebGL to work. Sorry.
  5. This is old reference emulating FFP with shaders. Can't find a direct download for the source though, it's probably lost http://www2.ati.com/misc/samples/dx9/FixedFuncShader.pdf Also from a quick glance this looks wrong: ambientEffect = normalize( ambientEffect ); Don't normalize. Doesn't make sense for a color factor. Edit: Found that thing among my stuff. Here you are: FFP.fx
  6. unbird

    3D Model Coding Question - DX11

    If you want to roll your own, read Buckeye's excellent article : Blending Animation Controller
  7. unbird

    Genus Calculation again.

    You're confusing vertices with positions. A cube can't be sensibly represented with 8 vertices alone - if you need texcoords and/or normals, that is.
  8. WARP uses CPU so floats should behave IEEE compliant. Don't rely on this for GPU. At least assume they can behave differently. Probably the debugger emulates the instructions on CPU, too. You can check for NaNs in HLSL though: if(isnan(whatever)) return float4(1.0, 0.0, 0.0, 1.0); // Red alert, this is not a drill Final note: Instrumenting your HLSL code can of course rearrange the instructions and give different results. And then hide the bug
  9. WARP working and hardware not can indeed be an indication for a driver error. But a dot ? I also bet the compiler will issue a dot instruction even you handwrite it That debug view is suspicious but I for one wouldn't trust it. I never had much luck with shader debugging particularly because of such behaviour. But since you got output, color debugging it is. Dump the dot result directly afterwards, "wrapped lighting" style: return float4(diffuseFactor.xxx * 0.5 + 0.5, 1.0); I rather suspect NaNs coming from those pows or something. Check the shader compiler log, they might spit out warnings.
  10. unbird

    System memory copy of vertices/mesh

    Also: The AABB of translated vertices is just the translated AABB.
  11. uint -> Format.R32_UInt ushort -> Format.R16_UInt Edit : Note that even after the edit you still use signed integers. Won't matter here though
  12. unbird

    The native side of Hololens

    He meant not to use the 'Formatted' font (it's for code anyway), e.g. like so fixed.
  13. Floats are fine. This is a common problem with standard displays which only have 8 bits precision per channel (sometimes even less). You need to dither. This is a good presentation about: Banding in Games Also search these forums, the topic returns regularily.
  14. Good news: The editor has improved a bit I guess. But now I miss the BB-code mode, since I usually edit posts in Notepad++. Is it really gone ? For programming posts, I like to use a monospace font to designate code within normal text. This was originally possible with the tag. Like here. Hodgman also uses/used it a lot. I tried to use "Formatted" from the font selection, but as you can see, it changes the whole paragraph. I currently use italic as a workaround. Also, this post, changed the word "target" with links to some online store. Admins can check the history, not sure if it sill "works". (I then changed "render target" to "rendertarget" ) This is very annoying. I don't mind ads anywhere (e.g. between thread posts), but automatically changing text of mine gives the impression I put those links in. I did not. What is this ? Thanks PS: Also: Old emojis are corrupt.
  15. Yeah, that doesn't really work. Keep your shader as is. The problem is likely elsewhere. The log you show only demonstrates your intention, not necessarily the result. I guess you have a (temporary) read write hazard, which the pipeline forbids and resets. Since one is called backFaceTexture I expect it was a rendertarget at some point. Reset the rendertarget (output merger stage) to null before setting the SRV. To make sure: turn up the DX debug layer (which immediately reports such things) and/or dig deeper, e.g. with renderdoc and check if the SRV slots are actually set. Edit: Be warned about that Rastertek article, it's misleading. He confuses texture arrays with, well, arrays of textures. A texture array is one resource (and then one SRV / slot) with several slices similar to a 3D texture. In HLSL this is explicitly written as Texture2DArray . On the other hand Texture2D blah[2] will generate two slots.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!