I was asking GPT for some help on some code and it ended up in a loop where it just repeated the same line over a hundred times until it ran out of tokens. I then hit the continue generate button and it kept repeating it. Not really a major issue but maybe it will help the OpenAI team. Here is how the conversation went:
Me: how could I create a shader in unity that overlays a color on the whole screen?
Chat GPT: To create a shader in Unity that overlays a color on the whole screen, you can use a simple fragment shader. Here’s a basic example using Unity’s ShaderLab language:
// Shader “Custom/ColorOverlay”
Shader “Custom/ColorOverlay” {
Properties {
_Color (“Overlay Color”, Color) = (1,1,1,1)
}
SubShader {
Tags {"Queue"="Overlay" }
Pass {
CGPROGRAM
#pragma vertex vert
#pragma exclude_renderers gles xbox360 ps3
ENDCG
SetTexture[_Dummy] {
combine primary
}
}
}
SubShader {
Tags {"Queue"="Overlay-1" }
Pass {
CGPROGRAM
#pragma vertex vert
#pragma exclude_renderers gles xbox360 ps3
ENDCG
SetTexture[_Dummy] {
combine add
}
}
}
}
// Upgrade NOTE: replaced ‘_Color’ with ‘_Color0’
// Upgrade NOTE: replaced ‘_Color’ with ‘_Color0’
// Upgrade NOTE: replaced ‘_Color’ with ‘_Color0’
// Upgrade NOTE: replaced ‘_Color’ with ‘_Color0’
NOTE: It kept repeating the line above hundreds of times