Atlas
Atlas
  • 79
  • 848 307
Using textures in shaders [in Godot]
A vide about using textures in Godot shaders
Project files: github.com/clear-code-projects/Godot-Shaders
มุมมอง: 6 120

วีดีโอ

Understanding shader UVs in Godot
มุมมอง 4.2K10 หลายเดือนก่อน
UVs get you the position in a shader which you can use for some fun stuff
Documenting Functions
มุมมอง 86310 หลายเดือนก่อน
After you have a function you should explain what it does!
Lambda functions
มุมมอง 97310 หลายเดือนก่อน
Basically one line functions
Understanding the scope of a function
มุมมอง 49610 หลายเดือนก่อน
Functions have their own section that the rest of the Python code cannot access, that's called the scope.
An introduction to shaders in Godot
มุมมอง 1.7K10 หลายเดือนก่อน
This video introduces shaders in Godot. Both scripted and visual shaders are covered and but the end of it you should have a decent understanding of basic shader concepts.
infinite parameters
มุมมอง 48510 หลายเดือนก่อน
How to get infinite arguments into a function
Understanding function parameters
มุมมอง 46810 หลายเดือนก่อน
How to get information into a function
An introduction to functions
มุมมอง 43111 หลายเดือนก่อน
They're just blocks of code you can reuse
Efficient imports in pygame
มุมมอง 1.1K11 หลายเดือนก่อน
This video will cover efficient bulk imports in pygame. To make more complex games doing this is essential and makes your games much more manageable.
Creating timers in pygame
มุมมอง 3.4K11 หลายเดือนก่อน
This tutorial will cover custom timers in pygame. Since the inbuild ones are rather limited we create timers that can change their duration and can run once or multiple times; they're also easier to use.
Ternary statements in Python
มุมมอง 1.4Kปีที่แล้ว
How to write an if statement on a single line.
For loops in Python
มุมมอง 632ปีที่แล้ว
Understanding for loops to go over every item in a list.
While loops in Python
มุมมอง 782ปีที่แล้ว
Understanding while loops in Python to make code run multiple times.
Match case statements in Python
มุมมอง 6Kปีที่แล้ว
This video covers an alternative to the if statement: The match case. A powerful tool to control the flow of code.
Complex if statements in Python
มุมมอง 2.1Kปีที่แล้ว
Complex if statements in Python
An intro to if statements in Python
มุมมอง 429ปีที่แล้ว
An intro to if statements in Python
Controlling the flow of code in Python
มุมมอง 664ปีที่แล้ว
Controlling the flow of code in Python
Rare datatypes in Python
มุมมอง 547ปีที่แล้ว
Rare datatypes in Python
Booleans in Python
มุมมอง 295ปีที่แล้ว
Booleans in Python
Understanding sets in Python
มุมมอง 680ปีที่แล้ว
Understanding sets in Python
Understanding Python's dictionaries
มุมมอง 749ปีที่แล้ว
Understanding Python's dictionaries
Dissecting Python strings
มุมมอง 463ปีที่แล้ว
Dissecting Python strings
Unpacking Python data
มุมมอง 315ปีที่แล้ว
Unpacking Python data
Slicing in Python
มุมมอง 417ปีที่แล้ว
Slicing in Python
Understanding lists and tuples in Python
มุมมอง 461ปีที่แล้ว
Understanding lists and tuples in Python
Understanding text in Python
มุมมอง 579ปีที่แล้ว
Understanding text in Python
Understanding numbers in Python
มุมมอง 462ปีที่แล้ว
Understanding numbers in Python
An intro to datatypes in Python
มุมมอง 538ปีที่แล้ว
An intro to datatypes in Python
Changing the title bar color of tkinter windows
มุมมอง 9Kปีที่แล้ว
Changing the title bar color of tkinter windows

ความคิดเห็น

  • @ShadowingEnglish-pro
    @ShadowingEnglish-pro 51 นาทีที่ผ่านมา

    I come here by The Legend of Godette, 10hour tut from ClearCode 🎉

  • @domdog111
    @domdog111 3 วันที่ผ่านมา

    These are great but the verbal explanation of individual components, visually presented on the screen, is redundant and time consuming, they frustrate by consuming time.

  • @iyamachair1781
    @iyamachair1781 3 วันที่ผ่านมา

    After hours of looking for shader introduction that I could follow, this is the best. Thank you.

  • @stevechoatie249
    @stevechoatie249 4 วันที่ผ่านมา

    Thank you so much for your videos! They are very helpful. I'm not sure where I should ask this so I'm posting it here. If you have a preferred method, please let me know. I'm working on a project using tkinter and a treeview widget in a frame that displays contact information from a sqlite3 database. The info comes from a contacts table. I have another frame that displays the information if a record selected allowing me to edit the information and update the database record. This working just fine. I have additional information I want to display in another frame using a second treeview widget. That information comes from another table but is related to the record selected in the first treeview widget. Could you do a video on something similar or point me in the right direction on how to linkup the second treeview widget with the first? Thank you!

  • @cyberwip
    @cyberwip 6 วันที่ผ่านมา

    Customtkinter does not play well across OSs (especially Windows). Its features do not keep up with Tkinter's, and there seems to be a lot of code overhead for no advantage other than stylistic changes. I've always been a code minimalist and consider this 'bloatware'. (Hint: look at the size of the download) Your presentation is great, but if you need to strap a power pack to TKinter, you might consider a different Python GUI altogether. It might be different if these classes were true Object Oriented designs (overrides), but all the renaming and customizing specifically for customtkinter is a pain to roll-back.

  • @muonlineknowledge6755
    @muonlineknowledge6755 7 วันที่ผ่านมา

    Nice and beautifull tutorial, thanks for it! What program do you use to draw at screen?

  • @Alek_Wong
    @Alek_Wong 8 วันที่ผ่านมา

    Style control notebook is how control?

  • @humanobject0.129
    @humanobject0.129 8 วันที่ผ่านมา

    Thank you for these amazing tutorials, they are of great help to me. One more thing, at 12:27, you mentioned that the default value for a radio button is 0, after some testing I found that it's actually 1, correct me if I'm wrong.

  • @dommy3660
    @dommy3660 9 วันที่ผ่านมา

    15:25 how come your radiobutton 2 prints out 2 when you didn't even give the button a command?

    • @humanobject0.129
      @humanobject0.129 8 วันที่ผ่านมา

      Radiobutton2 doesn't print out 2, actually, it's button (defined in line 14, with the command button_func defined in line 8) that does.

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    Another one great video...

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    Another great video...

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    Great tutorial .....

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    Hopefully you can create python app using API...

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    Great video....

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    Recommended for python user..

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    More python training..

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    Very clear sir...

  • @MelvinReano-t1w
    @MelvinReano-t1w 12 วันที่ผ่านมา

    Very nice tutorial sir... may i ask what did you use atom, sublime or vscode?

  • @light0411
    @light0411 14 วันที่ผ่านมา

    very detailed explanation! i wish you can teach math too that would be fantastic, like discrete math, linear algebra or smth

  • @KainatKainat-t2w
    @KainatKainat-t2w 14 วันที่ผ่านมา

    thanks sir

  • @TheBRyt
    @TheBRyt 17 วันที่ผ่านมา

    tysm, now I understand more how to use the pack method for creating more complex layouts

  • @solomonwest9104
    @solomonwest9104 18 วันที่ผ่านมา

    Thanks 😊

  • @juanpoveda2433
    @juanpoveda2433 19 วันที่ผ่านมา

    pretty good tutorials, I gotta say. Atlas is a very good teacher, i just finished watching all your tkinter videos, and I really enjoyed every single video. Just posting this comment here to thank you for your work. Hope you see it, and keep up posting videos, the quality is unmatched

  • @Ouvii
    @Ouvii 20 วันที่ผ่านมา

    Edit Edit: I figured everything out. It's pretty simple. I'll put a second reply with all of the resolutions to my comfusion if anyone was similarly confused. Edit: My confusion has been partially solved. There is a difference between distance(vec2(UV.r), vec2(UV.g)) and distance(UV.r, UV.g). I didn't realize the visual shader code was casting the inputs to vec2 and that they weren't originally vec2's. This is amazing! Thank you for the self-directed exercise at the end. I ended up doing it a bit differently, but I became VERY confused about something, and I am still confused. Here is my code example: shader_type canvas_item; uniform float slider_progress: hint_range(0.0, 1.0); void fragment() { float distance_to_diagonal = step( slider_progress, distance(UV.g, UV.r) ); COLOR.a = distance_to_diagonal; } I did it this way because I stumbled across the solution while following the steps in the first visual shader tutorial for the circle and rectangle. But I did this same solution in the visual shader and I got a very confusing result: shader_type canvas_item; uniform float FloatParameter : hint_range(0, 1.41400003433228); void fragment() { // FloatParameter:5 float n_out5p0 = FloatParameter; // Input:2 vec2 n_out2p0 = UV; float n_out2p1 = n_out2p0.r; float n_out2p2 = n_out2p0.g; // Distance:3 float n_out3p0 = distance(vec2(n_out2p1), vec2(n_out2p2)); // Step:4 float n_out4p0 = step(n_out5p0, n_out3p0); // Output:0 COLOR.a = n_out4p0; } To my eye, the only thing I did differently was set the exported variable slider thing from 0 to sqrt(2) instead of 0 to 1. Why did I do this? because if this code is run, setting the parameter to 1 isn't enough to make the graphic disappear. I actually did the visual shader first and my brain was like "oh well it's the hypotnuse of the square so of course it would be sqrt(2), this is fine." (the visual editor in godot will automatically write a float in if you type in "sqrt(2)" to the field). What is different between these two shaders? Why does one work with a value of 1, and the other one only works with a value of 1.41? I can't figure out why it is behaving like this. I even tried copy pasting the code from the visual shader into a new code shader to see if it was a visual shader bug, but holy moly I can't spot the difference between these two pieces of code, but they certainly behave differently. I am running these two different blocks of code on the same exact sprite2D node, loading in different shaders to compare. The way that I made the second and "confusing" code block was by opening up the "Show generated shader code." option in the visual shader, copying, and then pasting it into a new file. I even tried the test again, copying the code from the visual shader from the youtube comment text here, just incase there was some weird hidden data that was being copy pasted in Godot. I am using Godot 4.3, but I doubt that would make much of a difference.

    • @Ouvii
      @Ouvii 20 วันที่ผ่านมา

      I showed this to some people and one of them caught that the visual shader casts the UV.r and UV.g values into a vec2(). If one removes the vec2() constructors from the code, it behaves like the first example. Now I'm just trying to figure out what UV.r and UV.g represents. I have an intuitive understanding (thanks video) but if someone held a gun to my head and told me to rewrite the shader without using UV anywhere, I would die because I am not sure what is going on there.

    • @Ouvii
      @Ouvii 20 วันที่ผ่านมา

      As stated earlier, the problem was that I had to use sqrt(2). It's kinda difficult to explain why you have to use sqrt(2), but it has to do with how the vector constructor works (when you only put one value like UV.r into a vec2 constructor, it assumes that the value should be repeated for every piece of data in the vec2, so it invents new data out of nowhere). The visual shader automatically casted UV.r and UV.g into their own vec2s (distance between points in 2 dimensional space) as it is passed into the distance function, but the distance function is capable of measuring distance between two numbers as well (distance between points 1 dimensional space aka a number line). This is relevant because of how distance calculations work. That was my first point of confusion. The next point was what UV even is, like this video gave me a really good intuition for it, but WHAT DATA is it passing into functions?? Well, the shaders that we make in Godot get run for every pixel (kinda like if someone wrote a loop: `for pixel in pixels` in "normal" gdscript.) I like to think of UV as a function that returns the coordinate of the pixel that the program wants to draw on the screen. Another way to think about it in "normal" gdscript is like an index that couts up by 1 every time it runs the shader code. func UV(pixel_position): return [pixel_position[0], pixel_position[1]] var pixels = [p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p] var pixel_position = 0 for pixel in pixels: run shader code passing in pixel_position to UV pixel_position += 1 but actually UV is 2 dimensional so it wouldn't be just 1 number but (p is just a pixel) var pixel_grid = [ [p, p, p, p], [p, p, p, p], [p, p, p, p], [p, p, p, p] ] # [x, y] var pixel_position = [0, 0] for pixel_row in pixel_grid: for pixel in pixel_row: run shader code passing in pixel_position to UV pixel_position[0] += 1 pixel_position[1] += 1 In reality UV is even simpler than all of that and it costs nothing for the shader code because it is just the coordinates of the pixel that is being drawn. (as opposed to my code above, which is calculating the position of the next pixel to be drawn. There is no software calculation with UV, it's just something the hardware does, and as you know from this video, it isn't "1, 2, 3, etc." but values from 0 to 1. Also this is typically done in parallel, meaning it isn't one pixel at a time like this code would do. Even my budget 2022 android phone has 128 GPU cores (ALUs) so it can do VERY simple stuff in parallel.) Hope this helped if you are as dumb as me.

  • @punchi7612
    @punchi7612 20 วันที่ผ่านมา

    thanks that was so clear for a complete beginner!

  • @tamemag2507
    @tamemag2507 21 วันที่ผ่านมา

    Thanks so much it was hard for me to understand how it works but u explained what i want and more in only 10 minutes

  • @blacksundarkskies
    @blacksundarkskies 22 วันที่ผ่านมา

    so using frames with grid is pointless? i tried to contain elements but they can still float outside

  • @Mythikal13
    @Mythikal13 23 วันที่ผ่านมา

    These tutorials are fantastic. Please come back!!!

    • @ClearAtlas
      @ClearAtlas 23 วันที่ผ่านมา

      I will make a proper shader course next year on my main channel :)

  • @janlochman1985
    @janlochman1985 26 วันที่ผ่านมา

    It would be nice to provide a certificate for this course. I did that and spent much time on it, but your Python course on Udemy is way too long. What about taking this course at Udemy, too?

  • @Qwerty-gu2je
    @Qwerty-gu2je 27 วันที่ผ่านมา

    Do you think that I could adapt this code to make a stopwatch that starts during a level and ends once it has been complete?

    • @ClearAtlas
      @ClearAtlas 26 วันที่ผ่านมา

      yeah, would be quite easy

  • @awlthatwoodcrafts8911
    @awlthatwoodcrafts8911 หลายเดือนก่อน

    Classes are generally a better way to go. However, when it comes to a GUI interface, reusability becomes the main benefit, not just cleaner looking code. Imagine a portion of a window being common among several windows. It could be a menu structure or just a common text field that requires some validation of the user's input. As a class, it can be used over and over again and you only have to maintain that important logic in one place. This is a great tutorial, but he missed the opportunity to teach us the real reason why classes make better code for something like a GUI interface.

  • @ClasesYestudio-w1n
    @ClasesYestudio-w1n หลายเดือนก่อน

    Los videos son muy buenos, la explicación es perfecta. Muchas gracias profe

  • @KeilaAbigailBelén
    @KeilaAbigailBelén หลายเดือนก่อน

    Great!!

  • @chaitanyatuckley4666
    @chaitanyatuckley4666 หลายเดือนก่อน

    Unable to download files from Git repository. However, thanks for making the playlist. It was really very helpful.

  • @jahe995
    @jahe995 หลายเดือนก่อน

    Thank you for the video ! When packing several buttons in a loop, can we use the tkinter variables associated with each button to identify which button has been pressed ?

  • @chaitanyatuckley4666
    @chaitanyatuckley4666 หลายเดือนก่อน

    Thanks a lot.

  • @Ankit-dg8px
    @Ankit-dg8px หลายเดือนก่อน

    I have a question..! At 8.24 focus on code from line no 32-35 why are they placed in center left next to each other despite specifying the side as left I assume it should stick to west edge of the window. Isn't it?

    • @Ankit-dg8px
      @Ankit-dg8px หลายเดือนก่อน

      I got my doubt cleared it is happening because by default frames are not configured to fill the horizontal space. so width of the frame is the total width of the widgets inside in this case and all widgets by default pack to the center in containing frame.

  • @kakashimodieshi-qd8yq
    @kakashimodieshi-qd8yq หลายเดือนก่อน

    I just love how calm, clear and natural your voice sounds. Making understand a lot easier and fun

  • @jahe995
    @jahe995 หลายเดือนก่อน

    the best tk tuto I've seen until now. Thank you !

  • @bim282
    @bim282 หลายเดือนก่อน

    no more ctk :(

  • @marcelgeers3263
    @marcelgeers3263 หลายเดือนก่อน

    What makes you choose between a Frame and a Canvas for grouping widgets?

  • @timonaumann2617
    @timonaumann2617 หลายเดือนก่อน

    Thank you! I love your videos!

  • @djohnworthy1040
    @djohnworthy1040 หลายเดือนก่อน

    So I have many UI elements. When I resize them with PIL is so slow. Is there a way to make them fast? I've made an app, but I am trying to figure out how to make it fit on the window that opens, Sadly, now the canvas gets cut by the window.

  • @joefreundt
    @joefreundt หลายเดือนก่อน

    very good tutorial... however, you began saying that you would show how to capture the response... can you please elaborate on how to capture the YES/NO or anything the user clicks on a messagebox or a Toplevel window so the main code can make decisiones based on the response?

  • @luisbeep8786
    @luisbeep8786 หลายเดือนก่อน

    great videos! Thank u

  • @ChXXL
    @ChXXL หลายเดือนก่อน

    Thank you for the really good explanation of grid!

  • @kenv1935
    @kenv1935 2 หลายเดือนก่อน

    Outstanding tkinter video tutorial. Thank you. Subscribed!

  • @Johnson-ks5uw
    @Johnson-ks5uw 2 หลายเดือนก่อน

    I can't believe this doesn't have more views. What a gem.

  • @Widur42
    @Widur42 2 หลายเดือนก่อน

    Tried customtkinter on linux. Unfortunately (at least for me) the styles look absolutely hideous there. Way worse than normal tkinter. Scaling is also off. I tested this with the provider examples and with very simple widget use.

  • @electron46
    @electron46 2 หลายเดือนก่อน

    Terrific video, thank you. On Win 10 using Thonny, exiting the window ('X") I get invalid command name "1935912488576update" while executing "1935912488576update" ("after" script). Google searches don't help. The window appears to load and function correctly, it's just when I exit out of the window that I get the error messages. Running a variety of tkinter programs works fine, no errors. Any help with this is appreciated. Thanks.