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.
WoolyCreeper

[0.79.?] Fix Shaders for Terrafirmacraft Water

35 posts in this topic

Hey guys, I've been having a lot of problems trying to get this thing to work with shaders. Each time I fix something something else goes wrong. I finally (I say that) get everything to work, the grass waving and the water etc. but i didnt like the seed I had, so i created a new world, everything works but the grass stops swaying, and instead now only the actual tree trunks sway... weird... It works on the one map I don't want to play on, but not on any other map. I could suck it up and play on the one where it works, but I know there is still a problem and if you guys could help out that would be great :)

0

Share this post


Link to post
Share on other sites

Water shaders have changed IDs again. They are now: 438, 439, 440, 441, 442, 443 as of TFC v79.13

 

Since i bought a new rig with a nvidia geforce gtx 980 card, i can get some sick SEUS Ultra shaders going at a ridiculous resolution of 2715 x 1527 and a chunk distance of 16. My fps at these settings is around 25. 

 

Three screenshots for those who need proof.. he he

One

Two

Three

 

EDIT: OK i dont know what is going on but the water IDs now start from 426 onwards.

Nice! All I have to say is... Whats the texture pack? And how you get the blood particles to look so damn cool? :D

0

Share this post


Link to post
Share on other sites

I am using the most current version of TFC and SEUS.  I did everything that has been said to do, and it still does not work.  I would really appreciate the help.

0

Share this post


Link to post
Share on other sites

Can you get the shaders to work without any mods? When you say 'it' does not work, you have to be more specific. For example, to get TFC water shaders, you have to look up the block ID's using the NEI plugin for instance. The ID's posted in this thread may not be the same for you. You have to edit the gbuffers_water.vsh file on line 48 starting with if (mc_Entity.x == 8 || ...

0

Share this post


Link to post
Share on other sites

I'm trying to setup Super Shaders for TFC. I have the water working perfectly (even for streams mod) but the variables are defined differently. The leaves and grass works but how can I get everything to work like the seagrass, lava streams, etc? Here is what it looks like:

 

#define WAVING_LEAVES
#define WAVING_VINES
#define WAVING_GRASS
#define WAVING_WHEAT
#define WAVING_FLOWERS
#define WAVING_FIRE
#define WAVING_LAVA
#define WAVING_LILYPAD
 
#define ENTITY_LEAVES       218.0
#define ENTITY_VINES        486.0
#define ENTITY_TALLGRASS    204.0
#define ENTITY_DANDELION    474.0
#define ENTITY_ROSE         475.0
#define ENTITY_WHEAT        472.0
#define ENTITY_LILYPAD      473.0
#define ENTITY_FIRE          51.0
#define ENTITY_LAVAFLOWING  432.0
#define ENTITY_LAVASTILL    433.0
Edited by Phantom329
0

Share this post


Link to post
Share on other sites

...

 

Edit: As for whether or not the shader supports the unlocalized name, you would have to either ask the shader author, or try and see if it works for yourself.

 

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.

Edited by SilverFly
1

Share this post


Link to post
Share on other sites

Edit: Moved content to separate post, I moved too far away from the topic.

Edited by Saiden
0

Share this post


Link to post
Share on other sites
On October 18, 2014 at 9:28 PM, AHrubik said:

This fixes the waving leaves, waving grass, crops, flowers and saplings for TFC 79.x (MC 1.7.10). These are in the "gbuffers_terrain.vsh" file. Search for "WAVING_GRASS", "WAVING_LEAVES", "WAVING_WHEAT" (crops), "WAVING_FLOWERS" and "WAVING_SAPLINGS" respectively.


Waving Grass || mc_Entity.x == 204.0 || mc_Entity.x == 204.2 || mc_Entity.x == 435.0 || mc_Entity.x == 435.1 || mc_Entity.x == 435.2 || mc_Entity.x == 435.3 || mc_Entity.x == 435.4 || mc_Entity.x == 435.5 || mc_Entity.x == 435.6 || mc_Entity.x == 435.7 || mc_Entity.x == 435.8 || mc_Entity.x == 435.9 || mc_Entity.x == 435.10 || mc_Entity.x == 435.11 || mc_Entity.x == 435.12 || mc_Entity.x == 435.13 || mc_Entity.x == 435.14 || mc_Entity.x == 435.15Waving Leaves || mc_Entity.x == 218.0 || mc_Entity.x == 218.1 || mc_Entity.x == 218.2 || mc_Entity.x == 218.3 || mc_Entity.x == 218.4 || mc_Entity.x == 218.5 || mc_Entity.x == 218.6 || mc_Entity.x == 218.7 || mc_Entity.x == 218.8 || mc_Entity.x == 218.9 || mc_Entity.x == 218.10 || mc_Entity.x == 218.11 || mc_Entity.x == 218.12 || mc_Entity.x == 218.13 || mc_Entity.x == 218.14 || mc_Entity.x == 218.15 || mc_Entity.x == 219.0 || mc_Entity.x == 219.1

Crops "WAVING_WHEAT" || mc_Entity.x == 472.0  Flowers || mc_Entity.x == 474.0 || mc_Entity.x == 474.1 || mc_Entity.x == 474.2 || mc_Entity.x == 474.3 || mc_Entity.x == 474.4 || mc_Entity.x == 474.5 || mc_Entity.x == 475.0 || mc_Entity.x == 475.1 || mc_Entity.x == 475.2 || mc_Entity.x == 475.3 || mc_Entity.x == 475.4 || mc_Entity.x == 475.5 || mc_Entity.x == 475.6 || mc_Entity.x == 475.7 || mc_Entity.x == 475.8 || mc_Entity.x == 459.0Saplings || mc_Entity.x == 4571.0 || mc_Entity.x == 4571.1 || mc_Entity.x == 4571.2 || mc_Entity.x == 4571.3 || mc_Entity.x == 4571.4 || mc_Entity.x == 4571.5 || mc_Entity.x == 4571.6 || mc_Entity.x == 4571.7 || mc_Entity.x == 4571.8 

In the file composite.fsh edit the following line as shown to help with torch light color. Picture available by following the URL.

HI, i've used this before to fix the shaders and make them work for tic, but I lost that shader pack about 6 months ago(it was deleted) and now I'm trying to do it again but for some reason it no longer works, and nothing moves or waves, just wondering what I'm doing wrong or if is a new more recent way I need to do it.

0

Share this post


Link to post
Share on other sites

I'm using the modpack "TechNodeFirmaCraft" on ATLauncher, with TFC version 0.79.28, and the water IDs are different to what I've seen posted here. The IDs start at 537 and upwards. I just spent the last 5 hours trying to make mods work, so I hope this helps people get to a solution faster. Also, while I'm here I'm just gonna confirm that this does indeed work with MrMeepz Shaders v05, and the line that has to be edited in gbuffers_water.vsh is line 64.

Well, I think an appropriate way to leave off for now would be this quote:

"Engineers like to solve problems. If there are no problems readily available, they will create their own problems." -Scott Adams

0

Share this post


Link to post
Share on other sites