• 2

    posted a message on Extended Shaders 7.2.1
    Extended Shaders
    Example screenshot, using a shader to create an "x-ray" effect, and a post-processor to create a hexagonal blur. Shader API for mods!

    Extended Shaders is a coremod API that allows forges mod to use shaders, without needing to mess with coremodding and still being compatible with other mods that use shaders via this API.
    It allows mods to add shaders and post-processing effects!

    You cannot use this API without a good understanding of GLSL, including the GLSL compatibility profile as that is what you will be using.

    This mod is Optifine compatible. However, post-processing will ONLY work if "fast render" is OFF.
    If Optifine is installed, you can enable shaders by selecting 'Extended Shaders' in the shaderpacks menu. Otherwise, you can turn shaders on/off in the "Video Settings" menu.

    this mod REQUIRES your PC support framebuffers, framebuffer blitting, and floating-point textures. It will crash if you do not. This is purposeful.

    Download:

    1.12.2 - 7.2:
    Direct download - guaranteed latest version, unlike the curseforge link which requires that updates be approved.
    API

    1.7.10 - 6.0:
    ADFLY - ALWAYS the latest version, unlike the curseforge which requires that updates be approved.
    API

    Issue Tracker:

    1.12.2
    1.7.10

    Readme from github, for modders:

    Extended Shaders mod for Minecraft 1.12.2.
    The purpose of this API, and it's containing coremod, Extended Shaders, is to allow mods to use shaders and post-processors inside Minecraft without needing to learn how to make a coremod, and without sacrificing compatibility with other mods using this shader system.
    It is designed to allow multiple mods to "attach" shader uniforms, variables, constants, and code without conflicting with each other, in a way not provided by GLSL itself.
    It is NOT intended to be used by someone without a good understanding of GLSL.

    HOW TO USE:

    You will need to add the API classes to your project, PRESERVING the package names.
    HOW TO MAKE A SHADER:
    TO MAKE A VERTEX SHADER:
    1. create a file in your mod's assets, containing a list of the uniforms, variables, and constants, like this:
    uniform float burnAmount; //uniform
    varying vec4 fragCol; //variable
    #define col vec3(.976, .969, .816) //constant
    2. create a file in your mod's assets, containing the code for the shader, like this:
    fragCol = fragCol * col;
    3. create a new ShaderData instance, like this:
    vertShader = new ShaderData(new ResourceLocation(modid, uniformslocation), new ResourceLocation(modid, codelocation), uniform name 1, uniform name 2, ...);
    4. to turn it ON, do this:
    ShaderRegistry.addVertexShader(vertShader);
    5. to turn it OFF, do this:
    ShaderRegistry.removeVertexShader(vertShader);
    TO MAKE A FRAGMENT SHADER:
    1. create a file in your mod's assets, containing a list of the uniforms, variables, and constants, like this:
    uniform float burnAmount; //uniform
    varying vec2 textureCoords; //variable
    #define col vec3(.976, .969, .816) //constant
    2. create a file in your mod's assets, containing the code for the shader. you will work via modifying gl_fragData[0], or setting it if you prefer, like this:
    float depth = sqrt(eyePos.x * eyePos.x + eyePos.y * eyePos.y + eyePos.z * eyePos.z);
    if (depth > 64.0) discard;
    depth = clamp(depth / 64.0, 0, 1);
    float val = (max(max(gl_FragData[0].r, gl_FragData[0].g), gl_FragData[0].b) + min(min(gl_FragData[0].r, gl_FragData[0].g), gl_FragData[0].b)) * .25;
    gl_FragData[0] = vec4(vec3(1.0) - col * (depth + val - depth * val), gl_FragData[0].a);
    3. create a new ShaderData instance, like this:
    fragShader = new ShaderData(new ResourceLocation(modid, uniformslocation), new ResourceLocation(modid, codelocation), uniform name 1, uniform name 2, ...);
    4. to turn it ON, do this:
    ShaderRegistry.addFragmentShader(fragShader);
    5. to turn it OFF, do this:
    ShaderRegistry.removeFragmentShader(fragShader);
    PROVIDED UNIFORMS/VARIABLES:
    check src\main\resources\assets\extendedshaders\shaders\shader_uniform.txt
    HOW TO MAKE A POST-PROCESSOR:
    1. create a file in your mod's assets, containing a list of the post-processor's uniforms and constants, like this:
    uniform float currentTime; //uniform
    #define rad 3.0 //constant
    2. create a file in your mod's assets, conatining the post-processor's code, like this:
    float tx1 = rad * dx;
    float tx2 = tx1 * .5;
    float ty = rad * .5 * sqrt(3.0) * dy;
    vec3 cp1 = texture2D(tex0, texCoords).rgb;
    vec3 cp1 = texture2D(tex0, texCoords + vec2(tx1, 0)).rgb;
    vec3 cp3 = texture2D(tex0, texCoords + vec2(tx2, ty)).rgb;
    vec3 cp4 = texture2D(tex0, texCoords + vec2(-tx2, ty)).rgb;
    vec3 cp5 = texture2D(tex0, texCoords + vec2(-tx1, 0)).rgb;
    vec3 cp6 = texture2D(tex0, texCoords + vec2(-tx2, -ty)).rgb;
    vec3 cp7 = texture2D(tex0, texCoords + vec2(tx2, -ty)).rgb;
    gl_FragData[0] = vec4((cp1 + cp2 + cp3 + cp4 + cp5 + cp6 + cp7) / 7, 1);
    3. create a new PostProcessor instance, like this
    postProcessor = new PostProcessor(new ResourceLocation(modid, uniformslocation), new ResourceLocation(modid, codelocation), uniform name 1, uniform name 2, ...);
    4. to turn it ON use this:
    PostProcessorRegistry.addPostProcessor(postProcessor);
    5. to turn it OFF use this:
    PostProcessorRegistry.removePostProcessor(postProcessor);
    PROVIDED UNIFORMS/VARIABLES: check src\main\resources\assets\extendedshaders\shaders\post_processor_frag_uniforms.txt

    The API also allows for priorities on shaders and post-processors. Look through the API for more information on these advanced features.
    Posted in: Minecraft Mods
  • 1

    posted a message on OpenGL Error

    I just said I don't know how but there's plenty of information online, just google it. You'll probably want to find something specific to your system as well, IDK exactly how it works.

    Posted in: Java Edition Support
  • 1

    posted a message on OpenGL Error

    Ensure Minecraft is using your dedicated GPU and not your integrated GPU. There's plenty of information on how to do that on the web, so please don't ask me how because I don't know.

    Posted in: Java Edition Support
  • 1

    posted a message on pigs in minecraft

    considering you can stick a carrot on a stick and dangle it in front of their face to make them walk off a cliff to their death...

    Posted in: Discussion
  • 1

    posted a message on Minercaft lags at high priorities.

    The issue you're seeing is because Minecraft runs 2 threads: client and integrated server. What's likely happening is that only the server thread is being affected by the process priority - at high priority, it uses more of the CPU and lags your client thread (which is where frames are rendered and input is processed), while when it's low priority it uses less CPU, allowing the client thread to run stable but causing server lag.
    So, your CPU is probably a single-core and just way too weak to play Minecraft.

    Posted in: Java Edition Support
  • 1

    posted a message on Very strange bug that I can't find anywhere else

    This 'bug' is caused by the internal server freezing. You can still move around because that's handled client-side but interacting with blocks and items, as well as initiating elytra flight, are all handled by the server.

    Posted in: Java Edition Support
  • 1

    posted a message on Test Mode - a mode for the mapmakers

    Support


    Sounds pointless. You're wanting another version on creative mode...


    Someone didn't even read the OP...
    Posted in: Suggestions
  • 1

    posted a message on Forge Server for Minecraft Version 1.7.10 closes itself after a few seconds...

    for pete's sake, use notepad++ to open the log file and paste it into either a spoiler or a pastebin so we can actually read it.

    Posted in: Server Support and Administration
  • 1

    posted a message on How to play on a minecraft lan world without using internet?

    LAN play does not use the internet, it uses the Local Area Network. So if you are having connection issues, it's a problem in your network, not the internet.

    Posted in: Server Support and Administration
  • 1

    posted a message on Any way to convert mods such as "Ferdinand's Flowers" to 1.7.10 for myself?

    If the mod is open-source you could try building a private 1.7.10 backport, but you'll need to know how to mod 1.7.10 and 1.12.2 to do that.


    Though I think you should look into why 1.12 lags on you, it shouldn't be all that much different from 1.7.10.




    How wrong you are. RAM usage in 1.8 and newer is much higher than it was in 1.7.10, and that alone can cause serious lag issues in older computers.

    Posted in: Java Edition Support
  • To post a comment, please or register a new account.