Jockie Posted July 2, 2011 Posted July 2, 2011 (edited) After searching a long time for a valid/good HLSL bloom/glow effect I finally found one @ GameStudio Wiki Other bloom scripts uses a bloom'd image which overwrite the original, so I need this one. The problem is.. it turns the texture into an invisible texture instead of adding the bloom effect. (I know, I'm lazy, but I just started with these HLSL effects 2 days ago) This what I want to reach with it: (And maybe with a sin(Time)) The .fx code is on that Wiki under the C-Script section. This is the LUA script of it: addEventHandler("onClientResourceStart", g_ResourceRoot, function(res) if res == g_Resource then glowTextField = dxCreateRenderTarget(g_ScreenX,g_ScreenY,true) glowShader = dxCreateShader("glowtext.fx") dxSetShaderValue(glowShader , "entSkin1", glowTextField) end end ) addEventHandler("onClientRender", g_ResourceRoot, function() dxSetRenderTarget(glowTextField, true) dxDrawText("Glowing Text", g_ScreenX/2, g_ScreenY/2) dxSetRenderTarget() dxDrawImage(0,0,g_ScreenX,g_ScreenY, glowShader) end ) I've tried to remove all the f's behind the float numbers (?.. newbish solution) and I've also tried to replace the line: float4 vecSkill1; with: float4 vecSkill1 = float4{2.0f, 0.4f, 0.0f, 0.0f}; But that doesn't help neither. Hopefully does someone know how to solve this.. Grtz. Jockie EDIT: I guess I need to use the floatv() function in LUA which isn't available? Or it just changes 1 to 1.0 or 1.0f.. Edited July 3, 2011 by Guest
Jockie Posted July 5, 2011 Author Posted July 5, 2011 *bump* But does someone know a working glow/bloom shader? This seems valid also, but the only error I get is: ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed @ The last PixelShader technique
Buffalo Posted July 5, 2011 Posted July 5, 2011 These shader functions are quite new, i'd rather wait until ccw made some more error-explaining output. There will be more tutorials on it, but not now.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now