Any obstruction to the driver’s view is cause for a ticket. A large windshield crack would definitely block your view. Window tinting that is too dark and/or applied to drivers side windows or the windshield can also be cause for a ticket.
In some states, you may be given a “fix-it ticket” or correctable violation. Replace the windshield, bring your vehicle to the police station to verify that you replaced the windshield in a timely manner and the officer voids the ticket.
Not all states have fix-it tickets and, in some places, you may still be required to pay the ticket fine. There are serious consequences to not paying your tickets (losing your license or larger fines). Check the back of the ticket or with your local municipality to learn the details of any fix-it tickets given to you.
Better yet, visit your local AGRSS-registered and Independent Glass Association (IGA) certified glass repair shop and avoid the correctable violation completely. If you are short on time, some shops (like Auto One) have mobile Auto Glass service that will come to your home or business and replace the windshield.