Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.

SilverFly

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

1 Neutral

About SilverFly

  • Rank
    Freshly Spawned

Profile Information

  • Gender Male
  1. [0.79.?] Fix Shaders for Terrafirmacraft Water

    The ShadersModCore, originally daxnitro's shader mod and then karyonix's shader mod implements an OpenGL Shading Language (GLSL) class. The shader exposes the ability to customise shading functionality via GLSL vsh/fsh scripts. I've only seen examples which expose the id's via mc_Entity.x in these scripts. I don't know much about GLSL, but from what I've read it doesn't look like the java unlocalized names are accessible in the vsh/fsh scripts. I've recently installed TFC 79.26 and a few other mods and got shaders working. Here are the mods I'm using with Forge 4558: The ProjectRed mod is used to fix a cloud shadow glitch that affects the nVidia cards with optifine; I don't know how it does it, but just having it loaded does the trick. The ShadersModCore and OptiFine mods are the ones I use for Shaders. CodeChickenCore-1.7.10-1.0.7.47-universal.jarfastcraft-1.21.jarjourneymap-1.7.10-5.1.0-fairplay.jarNotEnoughItems-1.7.10-1.0.5.118-universal.jarOptiFine_1.7.10_HD_U_C1.jarProjectRed-1.7.10-4.7.0pre9.92-Base.jarShadersModCore-v2.3.31-mc1.7.10-f.jarTerraFirmaCraftNEIplugin-1.7.10-1.5.3.24.jarWaila-1.5.8a_1.7.10.jarWawla-1.3.1-1.7.10.jar[1.7.10]Decorations-1.0.20.jar[1.7.10]LeatherWaterSac-3.8.B79.jar[1.7.10]TerraFirmaCraft-0.79.26.881.jar I've tried Edi, Sildur and SEUS shaders and rather than just use item numbers each time, I put together a #define list which I added to the top of the vsh/fsh scripts I modified. Whilst not as good as unlocalized names, I found it easier to use the constants rather than the MC/TFC id's; that way at least if the TFC id's change, it's a fix to the constant rather than code logic. I've categorized them roughly into how the scripts use them (waving grass et al), instead of numerical sort order, since it makes it easier to copy them into the conditional statements. Feel free to update it, fix it, re-post it against this thread. //Vanilla 1.7.10//Water & Ice#define ENTITY_WATER_SOURCE 8.0#define ENTITY_WATER_STILL 9.0#define ENTITY_ICE 79.0//Waving Grass#define ENTITY_SHRUB 31.0#define ENTITY_GRASS 31.1#define ENTITY_FERN 31.2#define ENTITY_DEAD_BUSH 32.0//Waving Entities#define ENTITY_OAK_SAPLING 6.0#define ENTITY_DANDELION 37.0#define ENTITY_ROSE 38.0#define ENTITY_WHEAT 59.0#define ENTITY_CARROTS 141.0#define ENTITY_POTATOES 142.0//Waving Fire#define ENTITY_FIRE 51.0//Waving Leaves & double blocks#define ENTITY_LEAVES 18.0#define ENTITY_SPRUCE_LEAVES 18.1#define ENTITY_BIRCH_LEAVES 18.2#define ENTITY_JUNGLE_LEAVES 18.3#define ENTITY_ACACIA_LEAVES 161.0#define ENTITY_DARK_OAK_LEAVES 161.1#define ENTITY_SUNFLOWER 175.0#define ENTITY_LILAC 175.1#define ENTITY_DOUBLE_TALL_GRASS 175.2#define ENTITY_LARGE_FERN 175.3#define ENTITY_POPPY_BUSH 175.4#define ENTITY_PEONY 175.5//Waving Vines#define ENTITY_VINES 106.0//Waving Lava#define ENTITY_LAVA_FLOWING 10.0#define ENTITY_LAVA_STILL 11.0//Waving Lilypad#define ENTITY_LILYPAD 111.0//Others#define ENTITY_COBWEB 30.0#define ENTITY_WOOL 35.0#define ENTITY_TORCH 50.0#define ENTITY_LADDER 65.0#define ENTITY_IRON_BARS 101.0#define ENTITY_PAINTING 323.0#define ENTITY_SIGN 321.0#define ENTITY_ITEM_FRAME 389.0//Lit blocks#define ENTITY_FURNACE_LIT 62.0#define ENTITY_REDSTONE_TORCH 76.0#define ENTITY_JACK_O_LANTERN 91.0#define ENTITY_GLOWSTONE 89.0#define ENTITY_REDSTONE_LAMP_LIT 124.0#define ENTITY_BEACON 138.0//Ores#define ENTITY_GOLD_BLOCK 41.0#define ENTITY_IRON_BLOCK 42.0#define ENTITY_DIAMOND_BLOCK 57.0#define ENTITY_EMERALD_BLOCK 133.0//Sand#define ENTITY_SAND 12.0#define ENTITY_SANDSTONE 24.0#define ENTITY_SANDSTONE_SLAB 44.0#define ENTITY_SANDSTONE_STAIRS 128.0//Stones#define ENTITY_STONE 1.0#define ENTITY_COBBLE_STONE 4.0//TFC//Water & Ice#define TFC_ENTITY_SALT_WATER_FLOWING 426.0#define TFC_ENTITY_SALT_WATER_STILL 427.0#define TFC_ENTITY_FRESH_WATER_FLOWING 428.0#define TFC_ENTITY_FRESH_WATER_STILL 429.0#define TFC_ENTITY_HOT_SPRINGS_FLOWING 430.0#define TFC_ENTITY_HOT_SPRINGS_STILL 431.0#define TFC_ENTITY_PACKED_ICE 174.0#define TFC_ENTITY_ICE 434.0//Waving Grass#define TFC_ENTITY_TALL_GRASS 204.0#define TFC_ENTITY_FERN 204.1#define TFC_ENTITY_SHORT_GRASS 204.2#define TFC_ENTITY_SEA_GRASS 435.0//Waving Entities#define TFC_ENTITY_OAK_SAPLING 220.0#define TFC_ENTITY_ASPEN_SAPLING 220.1#define TFC_ENTITY_BIRCH_SAPLING 220.2#define TFC_ENTITY_CHESTNUT_SAPLING 220.3#define TFC_ENTITY_DOUGLAS_FIR_SAPLING 220.4#define TFC_ENTITY_HICKORY_SAPLING 220.5#define TFC_ENTITY_MAPLE_SAPLING 220.6#define TFC_ENTITY_ASH_SAPLING 220.7#define TFC_ENTITY_PINE_SAPLING 220.8#define TFC_ENTITY_SEQUOIA_SAPLING 220.9#define TFC_ENTITY_SPRUCE_SAPLING 220.10#define TFC_ENTITY_SYCAMORE_SAPLING 220.11#define TFC_ENTITY_WHITE_CEDAR_SAPLING 220.12#define TFC_ENTITY_WHITE_ELM_SAPLING 220.13#define TFC_ENTITY_WILLOW_SAPLING 220.14#define TFC_ENTITY_KAPOK_SAPLING 220.15#define TFC_ENTITY_ACACIA_SAPLING 221.0#define TFC_ENTITY_GOLDENROD 459.0#define TFC_ENTITY_DANDELION 474.0#define TFC_ENTITY_NASTURTIUM 474.1#define TFC_ENTITY_MEADS_MILKWEED 474.2#define TFC_ENTITY_TROPICAL_MILKWEED 474.3#define TFC_ENTITY_BUTTERFLY_MILKWEED 474.4#define TFC_ENTITY_CALENDULA 474.5#define TFC_ENTITY_POPPY 475.0#define TFC_ENTITY_BLUE_ORCHID 475.1#define TFC_ENTITY_ALLIUM 475.2#define TFC_ENTITY_HOUSTONIA 475.3#define TFC_ENTITY_RED_TULIP 475.4#define TFC_ENTITY_ORANGE_TULIP 475.5#define TFC_ENTITY_WHITE_TULIP 475.6#define TFC_ENTITY_PINK_TULIP 475.7#define TFC_ENTITY_DAISY 475.8#define TFC_ENTITY_RED_APPLE_TREE_SAPLING 4568.0#define TFC_ENTITY_BANANA_TREE_SAPLING 4568.1#define TFC_ENTITY_ORANGE_TREE_SAPLING 4568.2#define TFC_ENTITY_GREEN_APPLE_TREE_SAPLING 4568.3#define TFC_ENTITY_LEMON_TREE_SAPLING 4568.4#define TFC_ENTITY_OLIVE_TREE_SAPLING 4568.5#define TFC_ENTITY_CHERRY_TREE_SAPLING 4568.6#define TFC_ENTITY_PEACH_TREE_SAPLING 4568.7#define TFC_ENTITY_PLUM_TREE_SAPLING 4568.8#define TFC_ENTITY_SAPLINGS 4571.0//Waving Fire//Waving Leaves & double blocks#define TFC_ENTITY_OAK_LEAVES 218.0#define TFC_ENTITY_FRUIT_LEAVES 235.0#define TFC_ENTITY_CROPS 472.0#define TFC_ENTITY_FLOWERS 474.0#define TFC_ENTITY_FLOWERS2 475.0#define TFC_ENTITY_WINTERGREEN_BUSH 471.0#define TFC_ENTITY_BLUEBERRY_BUSH 471.1#define TFC_ENTITY_RASPBERRY_BUSH 471.2#define TFC_ENTITY_STRAWBERRY_BUSH 471.3#define TFC_ENTITY_BLACKBERRY_BUSH 471.4#define TFC_ENTITY_BUNCHBERRY_BUSH 471.5#define TFC_ENTITY_CRANBERRY_BUSH 471.6#define TFC_ENTITY_SNOWBERRY_BUSH 471.7#define TFC_ENTITY_ELDERBERRY_BUSH 471.8#define TFC_ENTITY_GOOSEBERRY_BUSH 471.9#define TFC_ENTITY_CLOUDBERRY_BUSH 471.10#define TFC_ENTITY_REED 483.0#define TFC_ENTITY_JUTE 4555.0//Waving Vines#define TFC_ENTITY_VINES 487.0//Waving Lava#define TFC_ENTITY_LAVA_FLOWING 432.0#define TFC_ENTITY_LAVA_STILL 433.0//Waving Lilypad#define TFC_ENTITY_LILYPAD 473.0//Lit blocks#define TFC_ENTITY_FIREPIT 224.0#define TFC_ENTITY_FORGE 228.0#define TFC_ENTITY_TORCH 478.0 Some tips: 1. Extract the shaders zips into your .minecraft\shaderpacks directory and take a copy of them to edit. Edit them whilst minecraft is running, and then switch shaders from the one you're editing to internal and back again to test your changes. You'll see an error message pop up in minecraft if your changes have a syntax error in them. Invalid scripts are ignored by the shader mod, so you can get some strange visuals, but it won't crash minecraft. Much faster than re-loading minecraft. 2. To add TFC Water, you'll need to modify gbuffers_water.vsh. Search for "mc_Entity.x == 9" and add the water id's. Example (note: don't copy the ... lines) ... if(mc_Entity.x == ENTITY_WATER_STILL || mc_Entity.x == ENTITY_WATER_SOURCE || mc_Entity.x == TFC_ENTITY_SALT_WATER_FLOWING || mc_Entity.x == TFC_ENTITY_SALT_WATER_STILL || mc_Entity.x == TFC_ENTITY_FRESH_WATER_FLOWING || mc_Entity.x == TFC_ENTITY_FRESH_WATER_STILL ) ... 3. To add TFC items/blocks and TFC lava, you'll need to modify gbuffers_terrain.vsh. The same approach is used for water (search for "mc_Entity.x == " and replace), but there are a few more conditional statements. Here is an example based on Edi's (I can share other examples if requested). #ifdef WAVING_LEAVES if(mc_Entity.x == ENTITY_LEAVES || mc_Entity.x == ENTITY_ACACIA_LEAVES || mc_Entity.x == ENTITY_SUNFLOWER || mc_Entity.x == TFC_ENTITY_OAK_LEAVES || mc_Entity.x == TFC_ENTITY_FLOWERS || mc_Entity.x == TFC_ENTITY_FLOWERS2 || mc_Entity.x == TFC_ENTITY_WINTERGREEN_BUSH || mc_Entity.x == TFC_ENTITY_JUTE || mc_Entity.x == TFC_ENTITY_FRUIT_LEAVES ) ... #ifdef WAVING_VINES if(mc_Entity.x == ENTITY_VINES || mc_Entity.x == TFC_ENTITY_VINES ) ... #ifdef WAVING_GRASS if(mc_Entity.x == ENTITY_SHRUB || mc_Entity.x == ENTITY_DEAD_BUSH || mc_Entity.x == TFC_ENTITY_TALL_GRASS ) ... #ifdef WAVING_FLOWERS if(mc_Entity.x == ENTITY_DANDELION || mc_Entity.x == ENTITY_ROSE || mc_Entity.x == ENTITY_CARROTS || mc_Entity.x == ENTITY_POTATOES || mc_Entity.x == TFC_ENTITY_OAK_SAPLING || mc_Entity.x == TFC_ENTITY_ACACIA_SAPLING || mc_Entity.x == TFC_ENTITY_GOLDENROD || mc_Entity.x == TFC_ENTITY_DANDELION || mc_Entity.x == TFC_ENTITY_POPPY ) ... #ifdef WAVING_WHEAT if(mc_Entity.x == ENTITY_WHEAT || mc_Entity.x == ENTITY_OAK_SAPLING || mc_Entity.x == TFC_ENTITY_RED_APPLE_TREE_SAPLING || mc_Entity.x == TFC_ENTITY_SAPLINGS || mc_Entity.x == TFC_ENTITY_CROPS ) ... #ifdef WAVING_FIRE if(mc_Entity.x == ENTITY_FIRE ) ... #ifdef WAVING_LAVA if(mc_Entity.x == ENTITY_LAVA_FLOWING || mc_Entity.x == ENTITY_LAVA_STILL || mc_Entity.x == TFC_ENTITY_LAVA_FLOWING || mc_Entity.x == TFC_ENTITY_LAVA_STILL ) ... #ifdef WAVING_LILYPAD if(mc_Entity.x == ENTITY_LILYPAD || mc_Entity.x == TFC_ENTITY_LILYPAD ) ... 4. Change composite.vsh/composite.fsh to change night shadow distance, torch, sun/night color. Most of them have comments explaining these. There is also some hand held item logic in these scripts too. 5. TFC seagrass blocks are attached to the ground below them, so if you add them to one of the wave conditional statment in pt 3, then you'll see sky color in the ocean as the ground waves. I think a new wave function is needed to change this behaviour. Let me know if you figure it out, as I didn't have any luck. 6. mc_Entity.x is rounded up to nnnn.0. This means the sub entities are not useable in the vsh/fsh scripts and only nnnn.0 items are relevant for if statements. So you can refer to ENTITY_SHRUB (31.0) in an if statement and it will also apply to ENTITY_GRASS (31.1) and ENTITY_FERN (31.2). I only found this out half way through modifying the scripts, so left the sub entities in the define list in case I need them in the future.