Jump to content
  • Advertisement
Sign in to follow this  
Charly7

OpenGL HLSL to GLSL conversion: problems

This topic is 3969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I'm new in shader's world and I'm trying to learn GLSL. I did some tutorial and I can say that I've understand enough. But now I have a problem. I want to do a shader that create a glow sun effect but I don't know how I can do this. I have my sphere in OpenGL and I need a shader that make it like a sun (with the glow all around it). I've found a shader (fragment and vertex) written in HLSL (from RenderMonkey). I tryed to translate it by myself and with the HLSL2GLSL (that convert it automatically) but in both cases it doesn't work and I can't see nothing. So, is there somemoby that can help me??? I'm despairing because I need this for my degree thesis. Please help me!!! I hope that my explanation is been clear enough. If you want to receive more information about what I've to do contact me and I'll give you some picture or the HLSL shader. I'll wait for your indispensable help. Charly

Share this post


Link to post
Share on other sites
Advertisement
Without knowing what exact shader you want to use, it's difficult to help you much...
I just recall most D3D shaders involving halos are really Effects. FX is a "super-HLSL" which cannot be translated in GLSL yet. If you're using an effect, forget about a magic tool.

In general however, translating shaders is never so difficult, you shouldn't need the translator in the first place.

Share this post


Link to post
Share on other sites
Ok I try to be more precise. I want to create a scattering shader in GLSL(pixel and fragment) in order to create the atmosphere for my earth sphere and glow for my sun sphere. I hope this time I've been clearer and I hope that you can help me.
Thx.

Charly

Share this post


Link to post
Share on other sites
IIRC, More OpenGL Programming has an example application on a Glow Shader. There should be some information on it somewhere here, because i think Dave wrote it.

I have the book somewhere so I'll see if I can find it. Though I don't feel comfortable just giving you the shader if its for Uni work, you wouldn't learn anything and wouldn't be able to explain what it did.

Share this post


Link to post
Share on other sites
Are you talking about "Golder Shine.rfx" for RenderMOnkey
It displays a coin with a glow effect.

Share this post


Link to post
Share on other sites
Neutrinohunter I need this shader for my degre thesis but my thesis is not about shader. I need it to make better my work. I have a little time so I can't spent much time trying to obtain the shader I want.
So I ask you to give me the shader if you find it. Shader are a new and very interesting topic for me so I won't do only copy and paste if you give me it because I want to learn more and became more confident about it. But now I've no time but I'd like to make better my work.

Anyway like I wrote yesterday I want to write shader to obtain atmospheric scattering for my sun and my earth.
So once again, can somebody help me???
Thx.

Charly

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net 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!