Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

78 Neutral

About rob35

  • Rank
  1. Thank you everybody for your responses; Hodgeman - I had not thought of that and will try it, thank you. SM2.0 is unfortunately the minimum for my project, but I agree that that is stupid. I am quite sure you seem to have more experience than I in this field; could you elaborate on this technique because it sounds to me like the best way of doing it. Thank you.
  2. There is a graphics maneuver that seems impossible to complete yet so basic... the very mention of it has put an end to this thread and this post on this forum. I'll ask again: is there ANY way for Shader Model 2.0 cards to draw Contour Lines - not by crappily applying a 1d texture (that will look horrible... again, look at the first post here) but by using the screen-space derivative functions to do it properly? That functions (ddy, ddx, etc.) do NOT exist on SM 2.0 cards. How do I proceed? I experimented using a derivative map that I passed along to the shader in a different texture channel, but there were two problems: 1. didn't completely standardize the widths of the lines and they became huge and pixelated when zoomed in (probably a precision problem) and 2. I am going to be animating datasets and interpolating along the time axis; perhaps I implemented it wrong, but it went bonkers when I tried this presumably because the derivate maps can't just be linearly interpolated.. (but shouldn't they be able to?)... there must be a simpler way to draw something as simple as contour lines over a texture! If I color the texture with a palette I can see the boundaries/edges where I want lines, so how do I get LINES?
  3. Yes, how do we get this to work on HLSL SM 2.0 cards? There's no ddx/ddy functions in any graphics cards but the new super-duper ones that many people don't have. It is so frustrating to think that it is impossible to have real contour lines without a SM 3.0 card! If anyone could figure out how to implement this on SM 2.0, they'd be a genius, but it seems that it is impossible unless you have the fancy ddx/ddy functions.
  4. Hello, I registered an account at this wonderful site to hopefully get help with my problem: I need to do exactly what this guy needed to. The last post in that thread was him asking how to rewrite the code for SM 2.0, which I need to do. The fwidth function that the other poster uses generates an error in ps_2_0. Computing line vertices is not an option for me - I am blending flat textures together that are mapped to a color palette to visualize gridded data. (This is entirely 2D, but you can think of the value at each spot in the texture as the third dimension) Basically, I am visualizing a dataset as an animation: each frame represents each hour. The program interpolates between data frames in the shader and is therefore showing something different at every screen update. I can't compute the lines that fast (30-60FPS), which is why I must do it in the shader. Like the guy in the thread I linked to tried, if I just fill a range with color, it is too wide/thin at times. I'm not sure if I can get the effect I want (constant width pixels) unless the shader can compare its output at one pixel to the output at the next. SM 2 isn't letting me use any of the ddx/ddy functions to do this. Shader model 2 is the maximum I can use for this project: can anybody help me get dynamic constant width contours on top of these textures? Thank you very much; I appreciate the help! ~Rob
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!