• Content count

  • Joined

  • Last visited

  • Days Won


Grozz last won the day on January 1

Grozz had the most liked content!

Community Reputation

22 Decent


About Grozz

  • Rank
    Advanced Member
  • Birthday 05/05/1998


  • Location
  • Interests
    Scripting, Modelling.
  1. I need a function that calculates ped's bone matrices. (bone_attach functions doesn't work) I'm working on a shader that actually can move a ped's bone.
  2. I don't know what is going on with the neck. I tried to fix it so many times, but i can't see that glitch in 3ds max.
  3. After I finished the first version of my character customization system i just realized its such a piece of crap, so i started writing a new version with a whole new concept. The first version worked with CJ skin and i just attached some custom head models to it. Conversely the new version is running with shaders and the skin is a custom dff. Here is a video of the head customization. The clothing is in progress yet, it takes a lot of time because i have to make custom cloth models. Hope you like it. Please don't ask for the source code, this script will never be released. Sorry.
  4. [2017] A Year in Recap and Season Greetings

    Oh my god. I didn't expect that my character customization script will reach much interest. Thank you so much!
  5. [Help] Aim and run at the same time

    Can you give an example please?
  6. I want to force the player to run and aim at the same time with machine guns. (M4, AK47)
  7. Working on a First Person Shooter gamemode, and i found a bug. The event onClientPreRender causes some delay at attachElements. Can somebody reproduce attachElements maths for me?
  8. [SHOW] 3D GUI Library

    all functions has a distance limit parameter.
  9. [SHOW] 3D GUI Library

    I made a 3D GUI System in MTA:SA. You can place 3D GUI Elements (Buttons, Textboxes, Labels, Lists, Checkboxes, Sliders, etc.) wherever you want. It's not public yet.
  10. [SHADER] Displacement shader in MTA

    I want to make face morph with this shader, but i have to figure out how can i supply tex2Dlod function. Is there a way to calculate it with tex2D function in PS, and export it to VS? Or just another solution with Shadermodel 2.0?
  11. [SHADER] Displacement shader in MTA

    It can handle VS 3.0, Ren_712 said its an exotic issue. I have Ati Mobility Radeon X2300
  12. [SHADER] Displacement shader in MTA

    So this shader works, but my Video Card just can't handle the tex2Dlod() function, so the result is crash, blue screen, or MTA just start flashing and lagging at me. // // Example shader - deform.fx // //------------------------------------------------------------------------------------------ // Variables //------------------------------------------------------------------------------------------ texture gDeformTexture; float3 sResizeAmount = float3(0,0,0); bool bIncludeNormal = false; //--------------------------------------------------------------------- // Include some common stuff //--------------------------------------------------------------------- #include "mta-helper.fx" static float PI = 3.14159265359; //--------------------------------------------------------------------- // Sampler for the main texture //--------------------------------------------------------------------- sampler Sampler0 = sampler_state { Texture = (gTexture0); }; sampler SamplerDeform = sampler_state { Texture = (gDeformTexture); MinFilter = Point; MagFilter = Point; MipFilter = None; }; //--------------------------------------------------------------------- // Structure of data sent to the vertex shader //--------------------------------------------------------------------- struct VSInput { float3 Position : POSITION0; float3 Normal : NORMAL0; float4 Diffuse : COLOR0; float3 TexCoord : TEXCOORD0; }; //--------------------------------------------------------------------- // Structure of data sent to the pixel shader ( from the vertex shader ) //--------------------------------------------------------------------- struct PSInput { float4 Position : POSITION0; float4 Diffuse : COLOR0; float2 TexCoord : TEXCOORD0; float4 WorldPos : TEXCOORD1; }; //------------------------------------------------------------------------------------------ // VertexShaderFunction //------------------------------------------------------------------------------------------ PSInput VertexShaderFunction(VSInput VS) { PSInput PS = (PSInput)0; // Make sure normal is valid MTAFixUpNormal( VS.Normal ); // deform vertex position float4 defTex = tex2Dlod(SamplerDeform, float4(VS.TexCoord.xy - float2(0,1), 0, 0.0)); if (bIncludeNormal) VS.Position += * sResizeAmount *; else VS.Position += * sResizeAmount; // Calculate screen pos of vertex PS.WorldPos = mul(float4(, 1), gWorld); float4 viewPos = mul(PS.WorldPos, gView); PS.Position = mul(viewPos, gProjection); // Calculate world normal float3 worldNormal = mul(VS.Normal, (float3x3)gWorld); // Pass through tex coord PS.TexCoord =; // Calculate GTA lighting for vehicle PS.Diffuse = MTACalcGTAVehicleDiffuse( worldNormal, VS.Diffuse ); return PS; } //------------------------------------------------------------------------------------------ // MTAApplyFog //------------------------------------------------------------------------------------------ int gFogEnable < string renderState="FOGENABLE"; >; float4 gFogColor < string renderState="FOGCOLOR"; >; float gFogStart < string renderState="FOGSTART"; >; float gFogEnd < string renderState="FOGEND"; >; float3 MTAApplyFog( float3 texel, float3 worldPos ) { if ( !gFogEnable ) return texel; float DistanceFromCamera = distance( gCameraPosition, worldPos ); float FogAmount = ( DistanceFromCamera - gFogStart )/( gFogEnd - gFogStart ); texel.rgb = lerp(texel.rgb, gFogColor.rgb, saturate( FogAmount ) ); return texel; } //------------------------------------------------------------------------------------------ // PixelShaderFunction //------------------------------------------------------------------------------------------ float4 PixelShaderFunction(PSInput PS) : COLOR0 { // sample color texture float4 finalColor = tex2D(Sampler0, PS.TexCoord.xy); // multiply by vertex color finalColor *= PS.Diffuse; // recreate fog finalColor.rgb = MTAApplyFog( finalColor.rgb, ); return saturate(finalColor); } //------------------------------------------------------------------------------------------ // Techniques //------------------------------------------------------------------------------------------ technique deform { pass P0 { VertexShader = compile vs_3_0 VertexShaderFunction(); PixelShader = compile ps_3_0 PixelShaderFunction(); } } // Fallback technique fallback { pass P0 { // Just draw normally } }
  13. [SHADER] Displacement shader in MTA

    I know pedmorph, but i don't want to morph the whole model, just a part of it.