Numark
Awesome Active Platinian
Hello, I am here again to post and show you guys how to do a Universal Chams in Unity games. I will be doing a tutorial on Pixel Gun 3D.
So what we are about to do is use Unity Methods using the class of Material, Shader, and Renderer.
What is Renderer?
In Unity, a renderer is a component responsible for rendering the appearance of an object in the scene. It is used to display the visual representation of a GameObject by drawing its associated mesh, texture, or material on the screen.
What is Material?
In Unity, a Material is a component that defines how the surface of a GameObject appears visually. It acts as a bridge between a shader and the textures, colors, or other properties that define how the shader interacts with light and other effects.
In Unity, a shader is a script or program that determines how an object is rendered, including how it interacts with light, shadows, and textures. Shaders are fundamental to creating visual effects in a Unity game and are used by materials to define an object's appearance.
Now, since you read and know. This all depends on the game and its functions. So find what's useful, find something that relates to Shaders, Skins, Etc...
Pixel Gun 3D uses SkinnedMeshRenderer to show and view its body/skin. It uses a method ActivateXRAY (Find it on Android 16.6.1 De-Obfuscated Version) that interlinks with SkinnedMeshRenderer.
I will be making a tutorial on how to customize it and how to modify it.
We will be creating our function pointers, so it'll be easier to use and modify.
You need to find these methods in these Dump.cs or find it using DNSPY. Don't copy and paste these onto your files, as this was for PC because I used an auto-updating offset.
Here is a preview of this:
Shader_Find is really important and really useful as it. We use "Hidden/Internal-Colored" because it is the most reliable and visible. Most other functions will cause an error and not render properly. Like I said, it really depends on the game and how they will use it to render.
SetColor to your choice to make your Chams Visual stunningly for you.
GetMaterial is to find the shader or renderer of the skin/body. You'll most likely need to find a field/method that renders the players body.
SetInt In Unity, SetInt is a method of the Material class that allows you to set an integer property on a material. This is commonly used to modify shader properties that are exposed as integers, such as toggles, enums, or other shader parameters that are integer-based. Meaning, you set the int and find a string to render it through walls, etc.
SetShader, of course set the shader and use ShaderFind to find the list of shaders to render to your likings.
I am too lazy too explain what these function pointers do, so I'll manage to fix it and explain later on. I know I missed out a lot of explanations, so feel free to comment down. I will edit this thread when I have the time.
So what we are about to do is use Unity Methods using the class of Material, Shader, and Renderer.
What is Renderer?
In Unity, a renderer is a component responsible for rendering the appearance of an object in the scene. It is used to display the visual representation of a GameObject by drawing its associated mesh, texture, or material on the screen.
Common Types of Renderers in Unity
- Mesh Renderer
- Used to render 3D meshes.
- Works in conjunction with a MeshFilter component, which holds the mesh data.
- Can be used to apply materials and shaders to customize the object's appearance.
- Skinned Mesh Renderer
- Used for rendering animated characters or objects that have a skeleton (rigged meshes).
- Deforms the mesh based on animations or transformations applied to its bones.
- Sprite Renderer
- Used for rendering 2D sprites in 2D games or UI elements.
- Line Renderer
- Used to render straight or curved lines between points.
- Commonly used for effects like laser beams or paths.
- Trail Renderer
- Used to create trails behind moving objects, like motion streaks.
- Particle System Renderer
- Works with particle systems to render particles in effects like smoke, fire, or explosions.
Key Properties of a Renderer
- Materials: Defines the visual appearance using shaders and textures.
- Sorting Layer and Order in Layer: Determines rendering order, especially for 2D sprites.
- Bounds: Defines the volume in which the object is visible for rendering.
- Shadow Casting Mode: Determines how the object interacts with shadows.
- Receive Shadows: Determines whether the object can receive shadows from other objects.
- Enabled: Toggles whether the object is rendered or not.
What is Material?
In Unity, a Material is a component that defines how the surface of a GameObject appears visually. It acts as a bridge between a shader and the textures, colors, or other properties that define how the shader interacts with light and other effects.
Key Features of a Material in Unity
- Shader:
- Every material requires a shader to define how it interacts with light and how it should render the object's surface.
- Unity provides built-in shaders (e.g., Standard, URP/Lit, HDRP/Lit), and you can also create custom shaders using ShaderLab, Shader Graph, or external tools.
- Example: Standard Shader, Unlit Shader, or a custom shader.
- Textures:
- Materials can include textures, which are images mapped onto the surface of a 3D object.
- Common texture slots in a material include:
- Albedo: The base color or texture of the object.
- Normal Map: Adds detail to the surface by simulating bumps and dents.
- Metallic/Smoothness: Controls how reflective and smooth the surface appears.
- Emission: Makes the object appear as if it emits light.
- Color:
- Materials often include color properties to tint or colorize the object's appearance.
- Example: The Albedo property may accept a solid color or a texture combined with a color.
- Rendering Mode:
- Controls how the material renders transparency and blending.
- Common rendering modes:
- Opaque: Fully solid, no transparency.
- Transparent: Supports full transparency (e.g., glass).
- Cutout: Allows sharp-edged transparency (e.g., leaves).
- Fade: Softly blends transparency (e.g., fog).
- Other Properties:
- Tiling and Offset: Adjust how a texture is mapped across the surface (scale, position).
- Specular Highlights: Defines how shiny the object appears under light.
- Reflection Probes: Determines how reflective surfaces interact with environment reflections.
In Unity, a shader is a script or program that determines how an object is rendered, including how it interacts with light, shadows, and textures. Shaders are fundamental to creating visual effects in a Unity game and are used by materials to define an object's appearance.
Types of Shaders in Unity
Unity offers several types of shaders, catering to different rendering needs:- Standard Shader:
- The default shader for Unity.
- Supports physically-based rendering (PBR) for realistic lighting and material properties.
- Offers properties like Albedo, Metallic, Smoothness, and Normal Maps.
- Works with Unity's lighting and reflection systems.
- Unlit Shader:
- Renders objects without reacting to lighting.
- Useful for UI elements, backgrounds, or stylized effects that don’t need light interaction.
- Custom Shaders:
- Created by developers using ShaderLab, Unity’s shader scripting language.
- Allows for custom effects, such as water, fire, holograms, or outlines.
- Shader Graph(Visual Scripting for Shaders):
- A node-based system for creating shaders without writing code.
- Available in Unity's Universal Render Pipeline (URP) and High-Definition Render Pipeline (HDRP).
- Ideal for artists and designers who want to create custom effects visually.
- Built-in Shaders:
- Unity includes built-in shaders like Diffuse, Specular, Transparent, and more.
- These are less commonly used now, as Unity encourages the use of the Standard Shader or custom solutions.
- Post-Processing Shaders:
- Applied to the camera for screen-wide effects like bloom, depth of field, or color grading.
How Shaders Work
Shaders are small programs that run on the GPU (Graphics Processing Unit) and are used to determine the color and texture of every pixel on the screen.Common Shader Stages:
- Vertex Shader:
- Processes vertex data (position, normal, UVs) and transforms it into screen space.
- Can modify the shape or position of objects.
- Fragment (Pixel) Shader:
- Determines the color of each pixel.
- Handles texture sampling, lighting calculations, and special effects.
- Geometry Shader(optional):
- Processes entire primitives (triangles, lines) and can generate new vertices.
- Useful for advanced effects like tessellation or procedural geometry.
- Compute Shader(optional):
- Runs general-purpose computations on the GPU.
- Not used for rendering directly but for tasks like particle systems, physics simulations, or advanced AI.
Now, since you read and know. This all depends on the game and its functions. So find what's useful, find something that relates to Shaders, Skins, Etc...
Pixel Gun 3D uses SkinnedMeshRenderer to show and view its body/skin. It uses a method ActivateXRAY (Find it on Android 16.6.1 De-Obfuscated Version) that interlinks with SkinnedMeshRenderer.
I will be making a tutorial on how to customize it and how to modify it.
We will be creating our function pointers, so it'll be easier to use and modify.
C++:
void* GetType(monoString* Type)
{
static const auto fn = (void* (*)(monoString*)) (getAbsolute(GetType_RVA));
return fn(Type);
}
void* Shader_Find(monoString* Type)
{
static const auto fn = (void* (*)(monoString*)) (getAbsolute(FindShader_RVA));
return fn(Type);
}
void Material_SetColor(void* obj, monoString* colorname, Color color)
{
static const auto fn = (void (*)(void*, monoString*, Color)) (getAbsolute(SetColor_RVA));
return fn(obj, colorname, color);
}
void Material_SetShader(void* obj, void* shader)
{
static const auto fn = (void (*)(void*, void*)) (getAbsolute(set_shader_RVA));
return fn(obj, shader);
}
void Material_SetInt(void* obj, monoString* string, int texture)
{
static const auto fn = (void (*)(void*, monoString*, int)) (getAbsolute(SetInt_RVA));
return fn(obj, string, texture);
}
void Material_SetFloat(void* obj, monoString* string, float texture)
{
static const auto fn = (void (*)(void*, monoString*, float)) (getAbsolute(SetFloat_RVA));
return fn(obj, string, texture);
}
void* Renderer_GetMaterial(void* obj)
{
static const auto fn = (void* (*)(void*)) (getAbsolute(GetMaterial_RVA));
return fn(obj);
}
void* Renderer_SetMaterial(void* obj, void* Material)
{
static const auto fn = (void* (*)(void*, void*)) (getAbsolute(SetMaterial_RVA));
return fn(obj, Material);
}
You need to find these methods in these Dump.cs or find it using DNSPY. Don't copy and paste these onto your files, as this was for PC because I used an auto-updating offset.
Here is a preview of this:
Shader_Find is really important and really useful as it. We use "Hidden/Internal-Colored" because it is the most reliable and visible. Most other functions will cause an error and not render properly. Like I said, it really depends on the game and how they will use it to render.
SetColor to your choice to make your Chams Visual stunningly for you.
GetMaterial is to find the shader or renderer of the skin/body. You'll most likely need to find a field/method that renders the players body.
SetInt In Unity, SetInt is a method of the Material class that allows you to set an integer property on a material. This is commonly used to modify shader properties that are exposed as integers, such as toggles, enums, or other shader parameters that are integer-based. Meaning, you set the int and find a string to render it through walls, etc.
SetShader, of course set the shader and use ShaderFind to find the list of shaders to render to your likings.
I am too lazy too explain what these function pointers do, so I'll manage to fix it and explain later on. I know I missed out a lot of explanations, so feel free to comment down. I will edit this thread when I have the time.