All Questions


Steven Rogge(fruitdude)

Texture not repeating in my own Project

Well I really have no clue what's going on here but I started to notice that in my project the watersprite won't tile itself when we tell to in the scripts. When i use the exact code from my Project and copy and paste in the according scripts in the project you provided in the downloads then it works perfectly.

So I am guessing I have to do something that was mentioned in Chapters before? because i jumped straight to the Watershader Chapter.

Edit1: Here is the link to my Github Repository if someone wants to check it out for themselfs

Edit2: So i think i figured it out. After the sentence in the tutorial "This code should make it so when you resize your Water2D sprite, the texture gets repeated instead of being stretched." I thought that would mean that the script already automatically does that for me. But i have to still manually guess at this point in the tutorial what numbers should be in the Shader Params.

Edit3: Well I am done with the Shader Secret course. Now the water won't move and I don't have any motivation anymore for shaders. Worst experience with Godot so far

  • GDQuestions replied

    I just checked the project. We already talked on Discord but I'll complete here.

    In your water shader, the scale was set to 0, 0, which is why you couldn't see the water: you were multiplying the UVs by 0, making it so you always sampled the same pixel. That's why you were getting a blue rectangle.

    Shaders are low-level programs so you'll have to be very patient with them. You're basically writing C-like code and manipulating pixels and vertices one by one. That's what shaders are and what makes them both simple (you're very limited in the base functions you have) and difficult at the same time (it's hard to achieve the looks you want and takes a good deal of programming experience).

    This course is generally for intermediate-level developers, as mentioned on the product page in the Prerequisites section - although I just checked and I think it could be clearer. I'll put it in bold and space the lines after posting this.

    Importantly, if you're new to shaders, we assume you went through the course introduction and the series linked in the pre-requisites shown above:

    Then, I understand it's frustrating to get stuck.

    When you do, we're here to help. But please note it will take up to 2 business days to get back to you - for example you linked your project at night for me, so I couldn't help you right away.

    Lastly, if you feel the course just doesn't work for you, we'll be happy to refund your purchase.

  • GDQuestions replied

    I just updated the product page and added the instruction you were missing in the lesson. Hopefully that'll help future students.

    Don't hesitate to let us know when you have issues - for one, we're here to help, and we also use our students' feedback to make improvements and fixes.